diff options
author | Stephane Marchesin <marchesin@icps.u-strasbg.fr> | 2009-05-04 19:05:59 +0200 |
---|---|---|
committer | Stephane Marchesin <marchesin@icps.u-strasbg.fr> | 2009-05-04 19:05:59 +0200 |
commit | 6e410b3bb6ff51580897431105aae14591cbf7fb (patch) | |
tree | f8aeba9352710f10cd6b1d5138c8fc3ece91c8c3 /helgrind |
Diffstat (limited to 'helgrind')
460 files changed, 82181 insertions, 0 deletions
diff --git a/helgrind/.deps/helgrind_amd64_linux-hg_basics.Po b/helgrind/.deps/helgrind_amd64_linux-hg_basics.Po new file mode 100644 index 0000000..c1427ed --- /dev/null +++ b/helgrind/.deps/helgrind_amd64_linux-hg_basics.Po @@ -0,0 +1,24 @@ +helgrind_amd64_linux-hg_basics.o: hg_basics.c \ + ../include/pub_tool_basics.h ../VEX/pub/libvex_basictypes.h \ + /usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stdarg.h ../config.h \ + ../include/pub_tool_libcbase.h ../include/pub_tool_libcassert.h \ + ../include/pub_tool_mallocfree.h ../include/pub_tool_threadstate.h \ + hg_basics.h + +../include/pub_tool_basics.h: + +../VEX/pub/libvex_basictypes.h: + +/usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stdarg.h: + +../config.h: + +../include/pub_tool_libcbase.h: + +../include/pub_tool_libcassert.h: + +../include/pub_tool_mallocfree.h: + +../include/pub_tool_threadstate.h: + +hg_basics.h: diff --git a/helgrind/.deps/helgrind_amd64_linux-hg_errors.Po b/helgrind/.deps/helgrind_amd64_linux-hg_errors.Po new file mode 100644 index 0000000..e8c2591 --- /dev/null +++ b/helgrind/.deps/helgrind_amd64_linux-hg_errors.Po @@ -0,0 +1,47 @@ +helgrind_amd64_linux-hg_errors.o: hg_errors.c \ + ../include/pub_tool_basics.h ../VEX/pub/libvex_basictypes.h \ + /usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stdarg.h ../config.h \ + ../include/pub_tool_libcbase.h ../include/pub_tool_libcassert.h \ + ../include/pub_tool_libcprint.h ../include/pub_tool_execontext.h \ + ../include/pub_tool_errormgr.h ../include/pub_tool_execontext.h \ + ../include/pub_tool_wordfm.h ../include/pub_tool_xarray.h \ + ../include/pub_tool_debuginfo.h ../include/pub_tool_threadstate.h \ + hg_basics.h hg_wordset.h hg_lock_n_thread.h libhb.h hg_errors.h + +../include/pub_tool_basics.h: + +../VEX/pub/libvex_basictypes.h: + +/usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stdarg.h: + +../config.h: + +../include/pub_tool_libcbase.h: + +../include/pub_tool_libcassert.h: + +../include/pub_tool_libcprint.h: + +../include/pub_tool_execontext.h: + +../include/pub_tool_errormgr.h: + +../include/pub_tool_execontext.h: + +../include/pub_tool_wordfm.h: + +../include/pub_tool_xarray.h: + +../include/pub_tool_debuginfo.h: + +../include/pub_tool_threadstate.h: + +hg_basics.h: + +hg_wordset.h: + +hg_lock_n_thread.h: + +libhb.h: + +hg_errors.h: diff --git a/helgrind/.deps/helgrind_amd64_linux-hg_lock_n_thread.Po b/helgrind/.deps/helgrind_amd64_linux-hg_lock_n_thread.Po new file mode 100644 index 0000000..b12851d --- /dev/null +++ b/helgrind/.deps/helgrind_amd64_linux-hg_lock_n_thread.Po @@ -0,0 +1,31 @@ +helgrind_amd64_linux-hg_lock_n_thread.o: hg_lock_n_thread.c \ + ../include/pub_tool_basics.h ../VEX/pub/libvex_basictypes.h \ + /usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stdarg.h ../config.h \ + ../include/pub_tool_libcbase.h ../include/pub_tool_libcassert.h \ + ../include/pub_tool_execontext.h ../include/pub_tool_threadstate.h \ + ../include/pub_tool_wordfm.h hg_basics.h hg_wordset.h \ + hg_lock_n_thread.h + +../include/pub_tool_basics.h: + +../VEX/pub/libvex_basictypes.h: + +/usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stdarg.h: + +../config.h: + +../include/pub_tool_libcbase.h: + +../include/pub_tool_libcassert.h: + +../include/pub_tool_execontext.h: + +../include/pub_tool_threadstate.h: + +../include/pub_tool_wordfm.h: + +hg_basics.h: + +hg_wordset.h: + +hg_lock_n_thread.h: diff --git a/helgrind/.deps/helgrind_amd64_linux-hg_main.Po b/helgrind/.deps/helgrind_amd64_linux-hg_main.Po new file mode 100644 index 0000000..df10347 --- /dev/null +++ b/helgrind/.deps/helgrind_amd64_linux-hg_main.Po @@ -0,0 +1,72 @@ +helgrind_amd64_linux-hg_main.o: hg_main.c ../include/pub_tool_basics.h \ + ../VEX/pub/libvex_basictypes.h \ + /usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stdarg.h ../config.h \ + ../include/pub_tool_libcassert.h ../include/pub_tool_libcbase.h \ + ../include/pub_tool_libcprint.h ../include/pub_tool_threadstate.h \ + ../include/pub_tool_tooliface.h ../include/pub_tool_errormgr.h \ + ../include/pub_tool_execontext.h ../VEX/pub/libvex.h \ + ../VEX/pub/libvex_basictypes.h ../VEX/pub/libvex_ir.h \ + ../include/pub_tool_hashtable.h ../include/pub_tool_replacemalloc.h \ + ../include/pub_tool_machine.h ../include/pub_tool_options.h \ + ../include/pub_tool_xarray.h ../include/pub_tool_stacktrace.h \ + ../include/pub_tool_debuginfo.h ../include/pub_tool_wordfm.h \ + hg_basics.h hg_wordset.h hg_lock_n_thread.h hg_errors.h libhb.h \ + helgrind.h ../include/valgrind.h + +../include/pub_tool_basics.h: + +../VEX/pub/libvex_basictypes.h: + +/usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stdarg.h: + +../config.h: + +../include/pub_tool_libcassert.h: + +../include/pub_tool_libcbase.h: + +../include/pub_tool_libcprint.h: + +../include/pub_tool_threadstate.h: + +../include/pub_tool_tooliface.h: + +../include/pub_tool_errormgr.h: + +../include/pub_tool_execontext.h: + +../VEX/pub/libvex.h: + +../VEX/pub/libvex_basictypes.h: + +../VEX/pub/libvex_ir.h: + +../include/pub_tool_hashtable.h: + +../include/pub_tool_replacemalloc.h: + +../include/pub_tool_machine.h: + +../include/pub_tool_options.h: + +../include/pub_tool_xarray.h: + +../include/pub_tool_stacktrace.h: + +../include/pub_tool_debuginfo.h: + +../include/pub_tool_wordfm.h: + +hg_basics.h: + +hg_wordset.h: + +hg_lock_n_thread.h: + +hg_errors.h: + +libhb.h: + +helgrind.h: + +../include/valgrind.h: diff --git a/helgrind/.deps/helgrind_amd64_linux-hg_wordset.Po b/helgrind/.deps/helgrind_amd64_linux-hg_wordset.Po new file mode 100644 index 0000000..2ed5f7f --- /dev/null +++ b/helgrind/.deps/helgrind_amd64_linux-hg_wordset.Po @@ -0,0 +1,28 @@ +helgrind_amd64_linux-hg_wordset.o: hg_wordset.c \ + ../include/pub_tool_basics.h ../VEX/pub/libvex_basictypes.h \ + /usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stdarg.h ../config.h \ + ../include/pub_tool_libcassert.h ../include/pub_tool_libcbase.h \ + ../include/pub_tool_libcprint.h ../include/pub_tool_threadstate.h \ + ../include/pub_tool_wordfm.h hg_basics.h hg_wordset.h + +../include/pub_tool_basics.h: + +../VEX/pub/libvex_basictypes.h: + +/usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stdarg.h: + +../config.h: + +../include/pub_tool_libcassert.h: + +../include/pub_tool_libcbase.h: + +../include/pub_tool_libcprint.h: + +../include/pub_tool_threadstate.h: + +../include/pub_tool_wordfm.h: + +hg_basics.h: + +hg_wordset.h: diff --git a/helgrind/.deps/helgrind_amd64_linux-libhb_core.Po b/helgrind/.deps/helgrind_amd64_linux-libhb_core.Po new file mode 100644 index 0000000..c066223 --- /dev/null +++ b/helgrind/.deps/helgrind_amd64_linux-libhb_core.Po @@ -0,0 +1,65 @@ +helgrind_amd64_linux-libhb_core.o: libhb_core.c \ + ../include/pub_tool_basics.h ../VEX/pub/libvex_basictypes.h \ + /usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stdarg.h ../config.h \ + ../include/pub_tool_libcassert.h ../include/pub_tool_libcbase.h \ + ../include/pub_tool_libcprint.h ../include/pub_tool_mallocfree.h \ + ../include/pub_tool_wordfm.h ../include/pub_tool_sparsewa.h \ + ../include/pub_tool_xarray.h ../include/pub_tool_oset.h \ + ../include/pub_tool_threadstate.h ../include/pub_tool_aspacemgr.h \ + ../include/pub_tool_execontext.h ../include/pub_tool_errormgr.h \ + ../include/pub_tool_execontext.h ../include/pub_tool_options.h \ + ../VEX/pub/libvex.h ../VEX/pub/libvex_basictypes.h \ + ../VEX/pub/libvex_ir.h hg_basics.h hg_wordset.h hg_lock_n_thread.h \ + hg_errors.h libhb.h + +../include/pub_tool_basics.h: + +../VEX/pub/libvex_basictypes.h: + +/usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stdarg.h: + +../config.h: + +../include/pub_tool_libcassert.h: + +../include/pub_tool_libcbase.h: + +../include/pub_tool_libcprint.h: + +../include/pub_tool_mallocfree.h: + +../include/pub_tool_wordfm.h: + +../include/pub_tool_sparsewa.h: + +../include/pub_tool_xarray.h: + +../include/pub_tool_oset.h: + +../include/pub_tool_threadstate.h: + +../include/pub_tool_aspacemgr.h: + +../include/pub_tool_execontext.h: + +../include/pub_tool_errormgr.h: + +../include/pub_tool_execontext.h: + +../include/pub_tool_options.h: + +../VEX/pub/libvex.h: + +../VEX/pub/libvex_basictypes.h: + +../VEX/pub/libvex_ir.h: + +hg_basics.h: + +hg_wordset.h: + +hg_lock_n_thread.h: + +hg_errors.h: + +libhb.h: diff --git a/helgrind/.deps/helgrind_ppc32_aix5-hg_basics.Po b/helgrind/.deps/helgrind_ppc32_aix5-hg_basics.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc32_aix5-hg_basics.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc32_aix5-hg_errors.Po b/helgrind/.deps/helgrind_ppc32_aix5-hg_errors.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc32_aix5-hg_errors.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc32_aix5-hg_lock_n_thread.Po b/helgrind/.deps/helgrind_ppc32_aix5-hg_lock_n_thread.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc32_aix5-hg_lock_n_thread.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc32_aix5-hg_main.Po b/helgrind/.deps/helgrind_ppc32_aix5-hg_main.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc32_aix5-hg_main.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc32_aix5-hg_wordset.Po b/helgrind/.deps/helgrind_ppc32_aix5-hg_wordset.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc32_aix5-hg_wordset.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc32_aix5-libhb_core.Po b/helgrind/.deps/helgrind_ppc32_aix5-libhb_core.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc32_aix5-libhb_core.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc32_linux-hg_basics.Po b/helgrind/.deps/helgrind_ppc32_linux-hg_basics.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc32_linux-hg_basics.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc32_linux-hg_errors.Po b/helgrind/.deps/helgrind_ppc32_linux-hg_errors.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc32_linux-hg_errors.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc32_linux-hg_lock_n_thread.Po b/helgrind/.deps/helgrind_ppc32_linux-hg_lock_n_thread.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc32_linux-hg_lock_n_thread.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc32_linux-hg_main.Po b/helgrind/.deps/helgrind_ppc32_linux-hg_main.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc32_linux-hg_main.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc32_linux-hg_wordset.Po b/helgrind/.deps/helgrind_ppc32_linux-hg_wordset.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc32_linux-hg_wordset.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc32_linux-libhb_core.Po b/helgrind/.deps/helgrind_ppc32_linux-libhb_core.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc32_linux-libhb_core.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc64_aix5-hg_basics.Po b/helgrind/.deps/helgrind_ppc64_aix5-hg_basics.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc64_aix5-hg_basics.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc64_aix5-hg_errors.Po b/helgrind/.deps/helgrind_ppc64_aix5-hg_errors.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc64_aix5-hg_errors.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc64_aix5-hg_lock_n_thread.Po b/helgrind/.deps/helgrind_ppc64_aix5-hg_lock_n_thread.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc64_aix5-hg_lock_n_thread.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc64_aix5-hg_main.Po b/helgrind/.deps/helgrind_ppc64_aix5-hg_main.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc64_aix5-hg_main.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc64_aix5-hg_wordset.Po b/helgrind/.deps/helgrind_ppc64_aix5-hg_wordset.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc64_aix5-hg_wordset.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc64_aix5-libhb_core.Po b/helgrind/.deps/helgrind_ppc64_aix5-libhb_core.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc64_aix5-libhb_core.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc64_linux-hg_basics.Po b/helgrind/.deps/helgrind_ppc64_linux-hg_basics.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc64_linux-hg_basics.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc64_linux-hg_errors.Po b/helgrind/.deps/helgrind_ppc64_linux-hg_errors.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc64_linux-hg_errors.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc64_linux-hg_lock_n_thread.Po b/helgrind/.deps/helgrind_ppc64_linux-hg_lock_n_thread.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc64_linux-hg_lock_n_thread.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc64_linux-hg_main.Po b/helgrind/.deps/helgrind_ppc64_linux-hg_main.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc64_linux-hg_main.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc64_linux-hg_wordset.Po b/helgrind/.deps/helgrind_ppc64_linux-hg_wordset.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc64_linux-hg_wordset.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_ppc64_linux-libhb_core.Po b/helgrind/.deps/helgrind_ppc64_linux-libhb_core.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/helgrind_ppc64_linux-libhb_core.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/helgrind_x86_linux-hg_basics.Po b/helgrind/.deps/helgrind_x86_linux-hg_basics.Po new file mode 100644 index 0000000..3d1c518 --- /dev/null +++ b/helgrind/.deps/helgrind_x86_linux-hg_basics.Po @@ -0,0 +1,26 @@ +helgrind_x86_linux-hg_basics.o: hg_basics.c ../include/pub_tool_basics.h \ + ../VEX/pub/libvex_basictypes.h ../include/pub_tool_basics_asm.h \ + /ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h \ + ../config.h ../include/pub_tool_libcbase.h \ + ../include/pub_tool_libcassert.h ../include/pub_tool_mallocfree.h \ + ../include/pub_tool_threadstate.h hg_basics.h + +../include/pub_tool_basics.h: + +../VEX/pub/libvex_basictypes.h: + +../include/pub_tool_basics_asm.h: + +/ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h: + +../config.h: + +../include/pub_tool_libcbase.h: + +../include/pub_tool_libcassert.h: + +../include/pub_tool_mallocfree.h: + +../include/pub_tool_threadstate.h: + +hg_basics.h: diff --git a/helgrind/.deps/helgrind_x86_linux-hg_errors.Po b/helgrind/.deps/helgrind_x86_linux-hg_errors.Po new file mode 100644 index 0000000..92ec073 --- /dev/null +++ b/helgrind/.deps/helgrind_x86_linux-hg_errors.Po @@ -0,0 +1,50 @@ +helgrind_x86_linux-hg_errors.o: hg_errors.c ../include/pub_tool_basics.h \ + ../VEX/pub/libvex_basictypes.h ../include/pub_tool_basics_asm.h \ + /ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h \ + ../config.h ../include/pub_tool_libcbase.h \ + ../include/pub_tool_libcassert.h ../include/pub_tool_libcprint.h \ + ../include/pub_tool_execontext.h ../include/pub_tool_errormgr.h \ + ../include/pub_tool_execontext.h ../include/pub_tool_wordfm.h \ + ../include/pub_tool_xarray.h ../include/pub_tool_debuginfo.h \ + ../include/pub_tool_threadstate.h hg_basics.h hg_wordset.h \ + hg_lock_n_thread.h libhb.h hg_errors.h + +../include/pub_tool_basics.h: + +../VEX/pub/libvex_basictypes.h: + +../include/pub_tool_basics_asm.h: + +/ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h: + +../config.h: + +../include/pub_tool_libcbase.h: + +../include/pub_tool_libcassert.h: + +../include/pub_tool_libcprint.h: + +../include/pub_tool_execontext.h: + +../include/pub_tool_errormgr.h: + +../include/pub_tool_execontext.h: + +../include/pub_tool_wordfm.h: + +../include/pub_tool_xarray.h: + +../include/pub_tool_debuginfo.h: + +../include/pub_tool_threadstate.h: + +hg_basics.h: + +hg_wordset.h: + +hg_lock_n_thread.h: + +libhb.h: + +hg_errors.h: diff --git a/helgrind/.deps/helgrind_x86_linux-hg_lock_n_thread.Po b/helgrind/.deps/helgrind_x86_linux-hg_lock_n_thread.Po new file mode 100644 index 0000000..f69f9b0 --- /dev/null +++ b/helgrind/.deps/helgrind_x86_linux-hg_lock_n_thread.Po @@ -0,0 +1,34 @@ +helgrind_x86_linux-hg_lock_n_thread.o: hg_lock_n_thread.c \ + ../include/pub_tool_basics.h ../VEX/pub/libvex_basictypes.h \ + ../include/pub_tool_basics_asm.h \ + /ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h \ + ../config.h ../include/pub_tool_libcbase.h \ + ../include/pub_tool_libcassert.h ../include/pub_tool_execontext.h \ + ../include/pub_tool_threadstate.h ../include/pub_tool_wordfm.h \ + hg_basics.h hg_wordset.h hg_lock_n_thread.h + +../include/pub_tool_basics.h: + +../VEX/pub/libvex_basictypes.h: + +../include/pub_tool_basics_asm.h: + +/ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h: + +../config.h: + +../include/pub_tool_libcbase.h: + +../include/pub_tool_libcassert.h: + +../include/pub_tool_execontext.h: + +../include/pub_tool_threadstate.h: + +../include/pub_tool_wordfm.h: + +hg_basics.h: + +hg_wordset.h: + +hg_lock_n_thread.h: diff --git a/helgrind/.deps/helgrind_x86_linux-hg_main.Po b/helgrind/.deps/helgrind_x86_linux-hg_main.Po new file mode 100644 index 0000000..93e06da --- /dev/null +++ b/helgrind/.deps/helgrind_x86_linux-hg_main.Po @@ -0,0 +1,74 @@ +helgrind_x86_linux-hg_main.o: hg_main.c ../include/pub_tool_basics.h \ + ../VEX/pub/libvex_basictypes.h ../include/pub_tool_basics_asm.h \ + /ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h \ + ../config.h ../include/pub_tool_libcassert.h \ + ../include/pub_tool_libcbase.h ../include/pub_tool_libcprint.h \ + ../include/pub_tool_threadstate.h ../include/pub_tool_tooliface.h \ + ../include/pub_tool_errormgr.h ../include/pub_tool_execontext.h \ + ../VEX/pub/libvex.h ../VEX/pub/libvex_basictypes.h \ + ../VEX/pub/libvex_ir.h ../include/pub_tool_hashtable.h \ + ../include/pub_tool_replacemalloc.h ../include/pub_tool_machine.h \ + ../include/pub_tool_options.h ../include/pub_tool_xarray.h \ + ../include/pub_tool_stacktrace.h ../include/pub_tool_debuginfo.h \ + ../include/pub_tool_wordfm.h hg_basics.h hg_wordset.h \ + hg_lock_n_thread.h hg_errors.h libhb.h helgrind.h ../include/valgrind.h + +../include/pub_tool_basics.h: + +../VEX/pub/libvex_basictypes.h: + +../include/pub_tool_basics_asm.h: + +/ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h: + +../config.h: + +../include/pub_tool_libcassert.h: + +../include/pub_tool_libcbase.h: + +../include/pub_tool_libcprint.h: + +../include/pub_tool_threadstate.h: + +../include/pub_tool_tooliface.h: + +../include/pub_tool_errormgr.h: + +../include/pub_tool_execontext.h: + +../VEX/pub/libvex.h: + +../VEX/pub/libvex_basictypes.h: + +../VEX/pub/libvex_ir.h: + +../include/pub_tool_hashtable.h: + +../include/pub_tool_replacemalloc.h: + +../include/pub_tool_machine.h: + +../include/pub_tool_options.h: + +../include/pub_tool_xarray.h: + +../include/pub_tool_stacktrace.h: + +../include/pub_tool_debuginfo.h: + +../include/pub_tool_wordfm.h: + +hg_basics.h: + +hg_wordset.h: + +hg_lock_n_thread.h: + +hg_errors.h: + +libhb.h: + +helgrind.h: + +../include/valgrind.h: diff --git a/helgrind/.deps/helgrind_x86_linux-hg_wordset.Po b/helgrind/.deps/helgrind_x86_linux-hg_wordset.Po new file mode 100644 index 0000000..379ef5e --- /dev/null +++ b/helgrind/.deps/helgrind_x86_linux-hg_wordset.Po @@ -0,0 +1,32 @@ +helgrind_x86_linux-hg_wordset.o: hg_wordset.c \ + ../include/pub_tool_basics.h ../VEX/pub/libvex_basictypes.h \ + ../include/pub_tool_basics_asm.h \ + /ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h \ + ../config.h ../include/pub_tool_libcassert.h \ + ../include/pub_tool_libcbase.h ../include/pub_tool_libcprint.h \ + ../include/pub_tool_threadstate.h ../include/pub_tool_wordfm.h \ + hg_basics.h hg_wordset.h + +../include/pub_tool_basics.h: + +../VEX/pub/libvex_basictypes.h: + +../include/pub_tool_basics_asm.h: + +/ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h: + +../config.h: + +../include/pub_tool_libcassert.h: + +../include/pub_tool_libcbase.h: + +../include/pub_tool_libcprint.h: + +../include/pub_tool_threadstate.h: + +../include/pub_tool_wordfm.h: + +hg_basics.h: + +hg_wordset.h: diff --git a/helgrind/.deps/helgrind_x86_linux-libhb_core.Po b/helgrind/.deps/helgrind_x86_linux-libhb_core.Po new file mode 100644 index 0000000..845a0b2 --- /dev/null +++ b/helgrind/.deps/helgrind_x86_linux-libhb_core.Po @@ -0,0 +1,68 @@ +helgrind_x86_linux-libhb_core.o: libhb_core.c \ + ../include/pub_tool_basics.h ../VEX/pub/libvex_basictypes.h \ + ../include/pub_tool_basics_asm.h \ + /ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h \ + ../config.h ../include/pub_tool_libcassert.h \ + ../include/pub_tool_libcbase.h ../include/pub_tool_libcprint.h \ + ../include/pub_tool_mallocfree.h ../include/pub_tool_wordfm.h \ + ../include/pub_tool_sparsewa.h ../include/pub_tool_xarray.h \ + ../include/pub_tool_oset.h ../include/pub_tool_threadstate.h \ + ../include/pub_tool_aspacemgr.h ../include/pub_tool_execontext.h \ + ../include/pub_tool_errormgr.h ../include/pub_tool_execontext.h \ + ../include/pub_tool_options.h ../VEX/pub/libvex.h \ + ../VEX/pub/libvex_basictypes.h ../VEX/pub/libvex_ir.h hg_basics.h \ + hg_wordset.h hg_lock_n_thread.h hg_errors.h libhb.h + +../include/pub_tool_basics.h: + +../VEX/pub/libvex_basictypes.h: + +../include/pub_tool_basics_asm.h: + +/ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h: + +../config.h: + +../include/pub_tool_libcassert.h: + +../include/pub_tool_libcbase.h: + +../include/pub_tool_libcprint.h: + +../include/pub_tool_mallocfree.h: + +../include/pub_tool_wordfm.h: + +../include/pub_tool_sparsewa.h: + +../include/pub_tool_xarray.h: + +../include/pub_tool_oset.h: + +../include/pub_tool_threadstate.h: + +../include/pub_tool_aspacemgr.h: + +../include/pub_tool_execontext.h: + +../include/pub_tool_errormgr.h: + +../include/pub_tool_execontext.h: + +../include/pub_tool_options.h: + +../VEX/pub/libvex.h: + +../VEX/pub/libvex_basictypes.h: + +../VEX/pub/libvex_ir.h: + +hg_basics.h: + +hg_wordset.h: + +hg_lock_n_thread.h: + +hg_errors.h: + +libhb.h: diff --git a/helgrind/.deps/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Po b/helgrind/.deps/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Po new file mode 100644 index 0000000..e8a9d17 --- /dev/null +++ b/helgrind/.deps/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Po @@ -0,0 +1,116 @@ +vgpreload_helgrind_amd64_linux_so-hg_intercepts.o: hg_intercepts.c \ + ../include/pub_tool_basics.h ../VEX/pub/libvex_basictypes.h \ + /usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stdarg.h ../config.h \ + ../include/pub_tool_redir.h ../include/valgrind.h helgrind.h \ + /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/bits/stdio.h /usr/include/assert.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h /usr/include/pthread.h \ + /usr/include/endian.h /usr/include/bits/endian.h /usr/include/sched.h \ + /usr/include/time.h /usr/include/bits/sched.h /usr/include/bits/time.h \ + /usr/include/xlocale.h /usr/include/signal.h /usr/include/bits/sigset.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/setjmp.h \ + /usr/include/semaphore.h /usr/include/sys/types.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/semaphore.h + +../include/pub_tool_basics.h: + +../VEX/pub/libvex_basictypes.h: + +/usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stdarg.h: + +../config.h: + +../include/pub_tool_redir.h: + +../include/valgrind.h: + +helgrind.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-redhat-linux/4.3.2/include/stddef.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/bits/stdio.h: + +/usr/include/assert.h: + +/usr/include/errno.h: + +/usr/include/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/pthread.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/sched.h: + +/usr/include/time.h: + +/usr/include/bits/sched.h: + +/usr/include/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/signal.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/bits/setjmp.h: + +/usr/include/semaphore.h: + +/usr/include/sys/types.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/semaphore.h: diff --git a/helgrind/.deps/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Po b/helgrind/.deps/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Po b/helgrind/.deps/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Po b/helgrind/.deps/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Po b/helgrind/.deps/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/.deps/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/.deps/vgpreload_helgrind_x86_linux_so-hg_intercepts.Po b/helgrind/.deps/vgpreload_helgrind_x86_linux_so-hg_intercepts.Po new file mode 100644 index 0000000..b2674be --- /dev/null +++ b/helgrind/.deps/vgpreload_helgrind_x86_linux_so-hg_intercepts.Po @@ -0,0 +1,125 @@ +vgpreload_helgrind_x86_linux_so-hg_intercepts.o: hg_intercepts.c \ + ../include/pub_tool_basics.h ../VEX/pub/libvex_basictypes.h \ + ../include/pub_tool_basics_asm.h \ + /ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h \ + ../config.h ../include/pub_tool_redir.h ../include/valgrind.h \ + helgrind.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \ + /usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h \ + /ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/bits/stdio.h /usr/include/assert.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h /usr/include/pthread.h \ + /usr/include/sched.h /usr/include/time.h /usr/include/bits/sched.h \ + /usr/include/bits/time.h /usr/include/xlocale.h /usr/include/signal.h \ + /usr/include/bits/sigset.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/setjmp.h /usr/include/semaphore.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/semaphore.h + +../include/pub_tool_basics.h: + +../VEX/pub/libvex_basictypes.h: + +../include/pub_tool_basics_asm.h: + +/ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h: + +../config.h: + +../include/pub_tool_redir.h: + +../include/valgrind.h: + +helgrind.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-32.h: + +/ptmp/marchesi/opt/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include/stddef.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/include/bits/wchar.h: + +/usr/include/gconv.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/bits/stdio.h: + +/usr/include/assert.h: + +/usr/include/errno.h: + +/usr/include/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/time.h: + +/usr/include/bits/sched.h: + +/usr/include/bits/time.h: + +/usr/include/xlocale.h: + +/usr/include/signal.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/bits/setjmp.h: + +/usr/include/semaphore.h: + +/usr/include/sys/types.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/semaphore.h: diff --git a/helgrind/.svn/dir-prop-base b/helgrind/.svn/dir-prop-base new file mode 100644 index 0000000..da4a263 --- /dev/null +++ b/helgrind/.svn/dir-prop-base @@ -0,0 +1,16 @@ +K 10 +svn:ignore +V 243 +.deps +helgrind-amd64-linux +helgrind-ppc32-linux +helgrind-ppc64-linux +helgrind-x86-linux +Makefile +Makefile.in +vgpreload_helgrind-amd64-linux.so +vgpreload_helgrind-ppc32-linux.so +vgpreload_helgrind-ppc64-linux.so +vgpreload_helgrind-x86-linux.so + +END diff --git a/helgrind/.svn/entries b/helgrind/.svn/entries new file mode 100644 index 0000000..3b4259a --- /dev/null +++ b/helgrind/.svn/entries @@ -0,0 +1,226 @@ +8 + +dir +9703 +svn://svn.valgrind.org/valgrind/trunk/helgrind +svn://svn.valgrind.org/valgrind + + + +2009-03-15T23:25:38.213170Z +9416 +njn +has-props + +svn:special svn:externals svn:needs-lock + + + + + + + + + + + +a5019735-40e9-0310-863c-91ae7b9d1cf9 + +hg_intercepts.c +file + + + + +2009-03-13T17:29:59.000000Z +4c0347b80766f4bc77bf3c07f6732f71 +2009-03-10T22:02:09.669944Z +9344 +njn + +hg_errors.h +file + + + + +2009-03-13T17:29:59.000000Z +49cfb9c69c123d0d7fd0b5e3d1da8e1f +2009-03-10T22:02:09.669944Z +9344 +njn + +helgrind.h +file + + + + +2009-03-13T17:29:59.000000Z +4d5f0424f46fabd606a69c95cbb32d70 +2009-03-10T22:02:09.669944Z +9344 +njn + +hg_main.c +file + + + + +2009-04-30T16:43:55.000000Z +ebb2d4f778cb646795ef7153502766fc +2009-03-15T23:25:38.213170Z +9416 +njn + +hg_wordset.c +file + + + + +2009-03-13T17:29:59.000000Z +d8a429ba83845e51ffc57b37348b7ddb +2009-03-10T22:02:09.669944Z +9344 +njn + +docs +dir + +README_YARD.txt +file + + + + +2009-03-13T17:29:59.000000Z +bb34f6de399819578286f5f3077ae81f +2008-10-25T16:22:41.648611Z +8707 +sewardj + +hg_lock_n_thread.c +file + + + + +2009-03-13T17:29:59.000000Z +8d7af180e014bb6118d169588f603fb3 +2009-03-10T22:02:09.669944Z +9344 +njn + +hg_wordset.h +file + + + + +2009-03-13T17:29:59.000000Z +4b9896a3623d4bb410438d7efb61856c +2009-03-10T22:02:09.669944Z +9344 +njn + +hg_lock_n_thread.h +file + + + + +2009-03-13T17:29:59.000000Z +cf621660dfe32f08290225cc4d001aae +2009-03-10T22:02:09.669944Z +9344 +njn + +tests +dir + +hg_basics.c +file + + + + +2009-03-13T17:29:59.000000Z +8c29c10deb3e538eebc7b83d902b4133 +2009-03-10T22:02:09.669944Z +9344 +njn + +libhb.h +file + + + + +2009-03-13T17:29:59.000000Z +68278834bfa089717072ddb0b07df10e +2009-03-10T22:02:09.669944Z +9344 +njn + +hg_basics.h +file + + + + +2009-03-13T17:30:00.000000Z +5d981ad3e0ef05e01ee0e6b88f4e8f9f +2009-03-10T22:02:09.669944Z +9344 +njn + +libhb_core.c +file + + + + +2009-04-30T16:43:55.000000Z +3d64543b3dc34ab4e62405b369bba155 +2009-03-15T23:25:38.213170Z +9416 +njn + +Makefile.am +file + + + + +2009-03-13T17:30:00.000000Z +5386f6c46810c3f9a826fa3277e073f6 +2009-01-22T21:56:32.234907Z +9031 +njn + +README_MSMProp2.txt +file + + + + +2009-03-13T17:30:00.000000Z +967ec9869d6c3f23157f4dfc405b76f1 +2008-10-25T16:22:41.648611Z +8707 +sewardj + +hg_errors.c +file + + + + +2009-03-13T17:30:00.000000Z +bd6ffc9b7c116a65d51bece430ae2f7a +2009-03-10T22:02:09.669944Z +9344 +njn + diff --git a/helgrind/.svn/format b/helgrind/.svn/format new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/helgrind/.svn/format @@ -0,0 +1 @@ +8 diff --git a/helgrind/.svn/text-base/Makefile.am.svn-base b/helgrind/.svn/text-base/Makefile.am.svn-base new file mode 100644 index 0000000..02f96ba --- /dev/null +++ b/helgrind/.svn/text-base/Makefile.am.svn-base @@ -0,0 +1,127 @@ +include $(top_srcdir)/Makefile.tool.am + +noinst_PROGRAMS = +if VGCONF_PLATFORMS_INCLUDE_X86_LINUX +noinst_PROGRAMS += helgrind-x86-linux vgpreload_helgrind-x86-linux.so +endif +if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX +noinst_PROGRAMS += helgrind-amd64-linux vgpreload_helgrind-amd64-linux.so +endif +if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX +noinst_PROGRAMS += helgrind-ppc32-linux vgpreload_helgrind-ppc32-linux.so +endif +if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX +noinst_PROGRAMS += helgrind-ppc64-linux vgpreload_helgrind-ppc64-linux.so +endif +if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5 +noinst_PROGRAMS += helgrind-ppc32-aix5 vgpreload_helgrind-ppc32-aix5.so +endif +if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5 +noinst_PROGRAMS += helgrind-ppc64-aix5 vgpreload_helgrind-ppc64-aix5.so +endif + +VGPRELOAD_HELGRIND_SOURCES_COMMON = hg_intercepts.c + +vgpreload_helgrind_x86_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_x86_linux_so_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX) +vgpreload_helgrind_x86_linux_so_CFLAGS = $(AM_CFLAGS_X86_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_x86_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_X86_LINUX) +vgpreload_helgrind_x86_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_X86_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_X86_LINUX) + +vgpreload_helgrind_amd64_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_amd64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX) +vgpreload_helgrind_amd64_linux_so_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_amd64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_AMD64_LINUX) +vgpreload_helgrind_amd64_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_AMD64_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX) + +vgpreload_helgrind_ppc32_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc32_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX) +vgpreload_helgrind_ppc32_linux_so_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc32_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_LINUX) +vgpreload_helgrind_ppc32_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC32_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX) + +vgpreload_helgrind_ppc64_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX) +vgpreload_helgrind_ppc64_linux_so_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_LINUX) +vgpreload_helgrind_ppc64_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC64_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX) + +vgpreload_helgrind_ppc32_aix5_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc32_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5) +vgpreload_helgrind_ppc32_aix5_so_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc32_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_AIX5) +vgpreload_helgrind_ppc32_aix5_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC32_AIX5) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC32_AIX5) + +vgpreload_helgrind_ppc64_aix5_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc64_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5) +vgpreload_helgrind_ppc64_aix5_so_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc64_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_AIX5) +vgpreload_helgrind_ppc64_aix5_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC64_AIX5) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC64_AIX5) + +HELGRIND_SOURCES_COMMON = \ + hg_basics.c hg_lock_n_thread.c hg_wordset.c libhb_core.c \ + hg_errors.c hg_main.c + +helgrind_x86_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_x86_linux_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX) +helgrind_x86_linux_CFLAGS = $(AM_CFLAGS_X86_LINUX) -O2 +helgrind_x86_linux_DEPENDENCIES = $(COREGRIND_LIBS_X86_LINUX) +helgrind_x86_linux_LDADD = $(TOOL_LDADD_X86_LINUX) +helgrind_x86_linux_LDFLAGS = $(TOOL_LDFLAGS_X86_LINUX) + +helgrind_amd64_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_amd64_linux_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX) +helgrind_amd64_linux_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) -O2 +helgrind_amd64_linux_DEPENDENCIES = $(COREGRIND_LIBS_AMD64_LINUX) +helgrind_amd64_linux_LDADD = $(TOOL_LDADD_AMD64_LINUX) +helgrind_amd64_linux_LDFLAGS = $(TOOL_LDFLAGS_AMD64_LINUX) + +helgrind_ppc32_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc32_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX) +helgrind_ppc32_linux_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) -O2 +helgrind_ppc32_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_LINUX) +helgrind_ppc32_linux_LDADD = $(TOOL_LDADD_PPC32_LINUX) +helgrind_ppc32_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC32_LINUX) + +helgrind_ppc64_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc64_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX) +helgrind_ppc64_linux_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) -O2 +helgrind_ppc64_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_LINUX) +helgrind_ppc64_linux_LDADD = $(TOOL_LDADD_PPC64_LINUX) +helgrind_ppc64_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC64_LINUX) + +helgrind_ppc32_aix5_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc32_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5) +helgrind_ppc32_aix5_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) -O2 +helgrind_ppc32_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_AIX5) +helgrind_ppc32_aix5_LDADD = $(TOOL_LDADD_PPC32_AIX5) +helgrind_ppc32_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC32_AIX5) + +helgrind_ppc64_aix5_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc64_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5) +helgrind_ppc64_aix5_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) -O2 +helgrind_ppc64_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_AIX5) +helgrind_ppc64_aix5_LDADD = $(TOOL_LDADD_PPC64_AIX5) +helgrind_ppc64_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC64_AIX5) + +hgincludedir = $(includedir)/valgrind + +hginclude_HEADERS = helgrind.h + +noinst_HEADERS = \ + hg_basics.h hg_lock_n_thread.h hg_errors.h hg_wordset.h \ + libhb.h + +EXTRA_DIST = README_MSMProp2.txt README_YARD.txt diff --git a/helgrind/.svn/text-base/README_MSMProp2.txt.svn-base b/helgrind/.svn/text-base/README_MSMProp2.txt.svn-base new file mode 100644 index 0000000..6b4ac5f --- /dev/null +++ b/helgrind/.svn/text-base/README_MSMProp2.txt.svn-base @@ -0,0 +1,156 @@ + +MSMProp2, a simplified but functionally equivalent version of MSMProp1 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Julian Seward, OpenWorks Ltd, 19 August 2008 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Note that this file does NOT describe the state machine used in the +svn://svn.valgrind.org/branches/YARD version of Helgrind. That state +machine is different again from any previously described machine. + +See the file README_YARD.txt for more details on YARD. + + ---------------------- + +In early 2008 Konstantin Serebryany proposed "MSMProp1", a memory +state machine for data race detection. It is described at +http://code.google.com/p/data-race-test/wiki/MSMProp1 + +Implementation experiences show MSMProp1 is useful, but difficult to +implement efficiently. In particular keeping the memory usage under +control is complex and difficult. + +This note points out a key simplification of MSMProp1, which makes it +easier to implement without changing the functionality. + + +The idea +~~~~~~~~ + +The core of the idea pertains to the "Condition" entry for MSMProp1 +state machine rules E5 and E6(r). These are, respectively: + + HB(SS, currS) and its negation + ! HB(SS, currS). + +Here, SS is a set of segments, and currS is a single segment. Each +segment contains a vector timestamp. The expression "HB(SS, currS)" +is intended to denote + + for each segment S in SS . happens_before(S,currS) + +where happens_before(S,T) means that S's vector timestamp is ordered +before-or-equal to T's vector timestamp. + +In words, the expression + + for each segment S in SS . happens_before(S,currS) + +is equivalent to saying that currS has a timestamp which is +greater-than-equal to the timestamps of all the segments in SS. + +The key observation is that this is equivalent to + + happens_before( JOIN(SS), currS ) + +where JOIN is the lattice-theoretic "max" or "least upper bound" +operation on vector clocks. Given the definition of HB, +happens_before and (binary) JOIN, this is easy to prove. + + +The consequences +~~~~~~~~~~~~~~~~ + +With that observation in place, it is a short step to observe that +storing segment sets in MSMProp1 is unnecessary. Instead of +storing a segment set in each shadow value, just store and +update a single vector timestamp. The following two equivalences +hold: + + MSMProp1 MSMProp2 + + adding a segment S join-ing S's vector timestamp + to the segment-set to the current vector timestamp + + HB(SS,currS) happens_before( + currS's timestamp, + current vector timestamp ) + +Once it is no longer necessary to represent segment sets, it then +also becomes unnecessary to represent segments. This constitutes +a significant simplication to the implementation. + + +The resulting state machine, MSMProp2 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +MSMProp2 is isomorphic to MSMProp1, with the following changes: + +States are New, Read(VTS,LS), Write(VTS,LS) + +where LS is a lockset (as before) and VTS is a vector timestamp. + +For a thread T with current lockset 'currLS' and current VTS 'currVTS' +making a memory access, the new rules are + +Name Old-State Op Guard New-State Race-If + +E1 New rd True Read(currVTS,currLS) False + +E2 New wr True Write(currVTS,currLS) False + +E3 Read(oldVTS,oldLS) rd True Read(newVTS,newLS) False + +E4 Read(oldVTS,oldLS) wr True Write(newVTS,newLS) #newLS == 0 + && !hb(oldVTS,currVTS) + +E5 Write(oldVTS,oldLS) rd hb(oldVTS, Read(currVTS,currLS) False + currVTS) + +E6r Write(oldVTS,oldLS) rd !hb(oldVTS, Write(newVTS,newLS) #newLS == 0 + currVTS) && !hb(oldVTS,currVTS) + +E6w Write(oldVTS,oldLS) wr True Write(newVTS,newLS) #newLS == 0 + && !hb(oldVTS,currVTS) + + where newVTS = join2(oldVTS,currVTS) + + newLS = if hb(oldVTS,currVTS) + then currLS + else intersect(oldLS,currLS) + + hb(vts1, vts2) = vts1 happens before or is equal to vts2 + + +Interpretation of the states +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +I always found the state names in MSMProp1 confusing. Both MSMProp1 +and MSMProp2 are easier to understand if the states Read and Write are +renamed, like this: + + old name new name + + Read WriteConstraint + Write AllConstraint + +The effect of a state Read(VTS,LS) is to constrain all later-observed +writes so that either (1) the writing thread holds at least one lock +in common with LS, or (2) those writes must happen-after VTS. If +neither of those two conditions hold, a race is reported. + +Hence a Read state places a constraint on writes. + +The effect of a state Write(VTS,LS) is similar, but it applies to all +later-observed accesses: either (1) the accessing thread holds at +least one lock in common with LS, or (2) those accesses must +happen-after VTS. If neither of those two conditions hold, a race is +reported. + +Hence a Write state places a constraint on all accesses. + +If we ignore the LS component of these states, the intuitive +interpretation of the VTS component is that it states the earliest +vector-time that the next write / access may safely happen. + diff --git a/helgrind/.svn/text-base/README_YARD.txt.svn-base b/helgrind/.svn/text-base/README_YARD.txt.svn-base new file mode 100644 index 0000000..992769c --- /dev/null +++ b/helgrind/.svn/text-base/README_YARD.txt.svn-base @@ -0,0 +1,34 @@ + +YARD, Yet Another Race Detector, built on the Helgrind framework +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Julian Seward, OpenWorks Ltd, 19 August 2008 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The YARD race detector lives in svn://svn.valgrind.org/branches/YARD. + +It uses a new and relatively simple race detection engine, based on +the idea of shadowing each memory location with two vector timestamps, +indicating respectively the "earliest safe read point" and "earliest +safe write point". As far as I know this is a novel approach. Some +features of the implementation: + +* Modularity. The entire race detection engine is placed in a + standalone library (libhb_core.c) with a simple interface (libhb.h). + This makes it easier to debug and verify the engine; indeed it can + be built as a standalone executable with test harness using "make -f + Makefile_sa". + +* Simplified and scalable storage management, so that large programs, + with many synchronisation events, can be handled. + +* Ability to report both call stacks involved in a race, without + excessive time or space overhead. + +* Pure happens before operation, so as not to give any false + positives. + +To use, build as usual and run as "--tool=helgrind". + +You can disable lock order checking with --track-lockorders=no, as it +sometimes produces an annoying amount of output. diff --git a/helgrind/.svn/text-base/helgrind.h.svn-base b/helgrind/.svn/text-base/helgrind.h.svn-base new file mode 100644 index 0000000..7696e7d --- /dev/null +++ b/helgrind/.svn/text-base/helgrind.h.svn-base @@ -0,0 +1,113 @@ +/* + ---------------------------------------------------------------- + + Notice that the above BSD-style license applies to this one file + (helgrind.h) only. The entire rest of Valgrind is licensed under + the terms of the GNU General Public License, version 2. See the + COPYING file in the source distribution for details. + + ---------------------------------------------------------------- + + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks LLP + info@open-works.co.uk + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + + 3. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + + 4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + ---------------------------------------------------------------- + + Notice that the above BSD-style license applies to this one file + (helgrind.h) only. The entire rest of Valgrind is licensed under + the terms of the GNU General Public License, version 2. See the + COPYING file in the source distribution for details. + + ---------------------------------------------------------------- +*/ + +#ifndef __HELGRIND_H +#define __HELGRIND_H + +#include "valgrind.h" + +typedef + enum { + VG_USERREQ__HG_CLEAN_MEMORY = VG_USERREQ_TOOL_BASE('H','G'), + + /* The rest are for Helgrind's internal use. Not for end-user + use. Do not use them unless you are a Valgrind developer. */ + + /* Notify the tool what this thread's pthread_t is. */ + _VG_USERREQ__HG_SET_MY_PTHREAD_T = VG_USERREQ_TOOL_BASE('H','G') + + 256, + _VG_USERREQ__HG_PTH_API_ERROR, /* char*, int */ + _VG_USERREQ__HG_PTHREAD_JOIN_POST, /* pthread_t of quitter */ + _VG_USERREQ__HG_PTHREAD_MUTEX_INIT_POST, /* pth_mx_t*, long mbRec */ + _VG_USERREQ__HG_PTHREAD_MUTEX_DESTROY_PRE, /* pth_mx_t* */ + _VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_PRE, /* pth_mx_t* */ + _VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_POST, /* pth_mx_t* */ + _VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, /* pth_mx_t*, long isTryLock */ + _VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, /* pth_mx_t* */ + _VG_USERREQ__HG_PTHREAD_COND_SIGNAL_PRE, /* pth_cond_t* */ + _VG_USERREQ__HG_PTHREAD_COND_BROADCAST_PRE, /* pth_cond_t* */ + _VG_USERREQ__HG_PTHREAD_COND_WAIT_PRE, /* pth_cond_t*, pth_mx_t* */ + _VG_USERREQ__HG_PTHREAD_COND_WAIT_POST, /* pth_cond_t*, pth_mx_t* */ + _VG_USERREQ__HG_PTHREAD_COND_DESTROY_PRE, /* pth_cond_t* */ + _VG_USERREQ__HG_PTHREAD_RWLOCK_INIT_POST, /* pth_rwlk_t* */ + _VG_USERREQ__HG_PTHREAD_RWLOCK_DESTROY_PRE, /* pth_rwlk_t* */ + _VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE, /* pth_rwlk_t*, long isW */ + _VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST, /* pth_rwlk_t*, long isW */ + _VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_PRE, /* pth_rwlk_t* */ + _VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_POST, /* pth_rwlk_t* */ + _VG_USERREQ__HG_POSIX_SEM_INIT_POST, /* sem_t*, ulong value */ + _VG_USERREQ__HG_POSIX_SEM_DESTROY_PRE, /* sem_t* */ + _VG_USERREQ__HG_POSIX_SEM_POST_PRE, /* sem_t* */ + _VG_USERREQ__HG_POSIX_SEM_WAIT_POST, /* sem_t* */ + _VG_USERREQ__HG_PTHREAD_BARRIER_INIT_PRE, /* pth_bar_t*, ulong */ + _VG_USERREQ__HG_PTHREAD_BARRIER_WAIT_PRE, /* pth_bar_t* */ + _VG_USERREQ__HG_PTHREAD_BARRIER_DESTROY_PRE /* pth_bar_t* */ + } Vg_TCheckClientRequest; + +/* Clean memory state. This makes Helgrind forget everything it knew + about the specified memory range, and resets it to New. This is + particularly useful for memory allocators that wish to recycle + memory. */ +#define VALGRIND_HG_CLEAN_MEMORY(_qzz_start, _qzz_len) \ + do { \ + unsigned long _qzz_res; \ + VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, VG_USERREQ__HG_CLEAN_MEMORY, \ + _qzz_start, _qzz_len, 0, 0, 0); \ + (void)0; \ + } while(0) + +#endif /* __HELGRIND_H */ diff --git a/helgrind/.svn/text-base/hg_basics.c.svn-base b/helgrind/.svn/text-base/hg_basics.c.svn-base new file mode 100644 index 0000000..d7f3fa7 --- /dev/null +++ b/helgrind/.svn/text-base/hg_basics.c.svn-base @@ -0,0 +1,86 @@ + +/*--------------------------------------------------------------------*/ +/*--- Basic definitions for all of Helgrind. ---*/ +/*--- hg_basics.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_libcbase.h" +#include "pub_tool_libcassert.h" +#include "pub_tool_mallocfree.h" +#include "pub_tool_threadstate.h" + +#include "hg_basics.h" /* self */ + + +/*----------------------------------------------------------------*/ +/*--- Very basic stuff ---*/ +/*----------------------------------------------------------------*/ + +void* HG_(zalloc) ( HChar* cc, SizeT n ) +{ + void* p; + tl_assert(n > 0); + p = VG_(malloc)( cc, n ); + tl_assert(p); + VG_(memset)(p, 0, n); + return p; +} + +void HG_(free) ( void* p ) +{ + tl_assert(p); + VG_(free)(p); +} + +Char* HG_(strdup) ( HChar* cc, const Char* s ) +{ + return VG_(strdup)( cc, s ); +} + + +/*----------------------------------------------------------------*/ +/*--- Command line options ---*/ +/*----------------------------------------------------------------*/ + +/* Description of these flags is in hg_basics.h. */ + +Bool HG_(clo_track_lockorders) = True; + +Bool HG_(clo_cmp_race_err_addrs) = False; + +Bool HG_(clo_show_conflicts) = True; + +UWord HG_(clo_conflict_cache_size) = 1000000; + +Word HG_(clo_sanity_flags) = 0; + + +/*--------------------------------------------------------------------*/ +/*--- end hg_basics.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/.svn/text-base/hg_basics.h.svn-base b/helgrind/.svn/text-base/hg_basics.h.svn-base new file mode 100644 index 0000000..4923c0e --- /dev/null +++ b/helgrind/.svn/text-base/hg_basics.h.svn-base @@ -0,0 +1,97 @@ + +/*--------------------------------------------------------------------*/ +/*--- Basic definitions for all of Helgrind. ---*/ +/*--- hg_basics.h ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#ifndef __HG_BASICS_H +#define __HG_BASICS_H + + +/*----------------------------------------------------------------*/ +/*--- Very basic stuff ---*/ +/*----------------------------------------------------------------*/ + +#define HG_(str) VGAPPEND(vgHelgrind_,str) + +void* HG_(zalloc) ( HChar* cc, SizeT n ); +void HG_(free) ( void* p ); +Char* HG_(strdup) ( HChar* cc, const Char* s ); + +static inline Bool HG_(is_sane_ThreadId) ( ThreadId coretid ) { + return coretid >= 0 && coretid < VG_N_THREADS; +} + + +/*----------------------------------------------------------------*/ +/*--- Command line options ---*/ +/*----------------------------------------------------------------*/ + +/* Flags for controlling for which events sanity checking is done */ +#define SCE_THREADS (1<<0) // Sanity check at thread create/join +#define SCE_LOCKS (1<<1) // Sanity check at lock events +#define SCE_BIGRANGE (1<<2) // Sanity check at big mem range events +#define SCE_ACCESS (1<<3) // Sanity check at mem accesses +#define SCE_LAOG (1<<4) // Sanity check at significant LAOG events + +#define SCE_BIGRANGE_T 256 // big mem range minimum size + + +/* Enable/disable lock order checking. Sometimes it produces a lot of + errors, possibly genuine, which nevertheless can be very + annoying. */ +extern Bool HG_(clo_track_lockorders); + +/* When comparing race errors for equality, should the race address be + taken into account? For users, no, but for verification purposes + (regtesting) this is sometimes important. */ +extern Bool HG_(clo_cmp_race_err_addrs); + +/* Show conflicting accesses? This involves collecting and storing + large numbers of call stacks just in case we might need to show + them later, and so is expensive (although very useful). Hence + allow it to be optionally disabled. */ +extern Bool HG_(clo_show_conflicts); + +/* Size of the conflicting-access cache, measured in terms of + maximum possible number of elements in the previous-access map. + Must be between 10k amd 10 million. Default is 1 million. */ +extern UWord HG_(clo_conflict_cache_size); + +/* Sanity check level. This is an or-ing of + SCE_{THREADS,LOCKS,BIGRANGE,ACCESS,LAOG}. */ +extern Word HG_(clo_sanity_flags); + + + + +#endif /* ! __HG_BASICS_H */ + +/*--------------------------------------------------------------------*/ +/*--- end hg_basics.h ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/.svn/text-base/hg_errors.c.svn-base b/helgrind/.svn/text-base/hg_errors.c.svn-base new file mode 100644 index 0000000..fbb499b --- /dev/null +++ b/helgrind/.svn/text-base/hg_errors.c.svn-base @@ -0,0 +1,813 @@ + +/*--------------------------------------------------------------------*/ +/*--- Error management for Helgrind. ---*/ +/*--- hg_errors.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_libcbase.h" +#include "pub_tool_libcassert.h" +#include "pub_tool_libcprint.h" +#include "pub_tool_execontext.h" +#include "pub_tool_errormgr.h" +#include "pub_tool_wordfm.h" +#include "pub_tool_xarray.h" +#include "pub_tool_debuginfo.h" +#include "pub_tool_threadstate.h" + +#include "hg_basics.h" +#include "hg_wordset.h" +#include "hg_lock_n_thread.h" +#include "libhb.h" +#include "hg_errors.h" /* self */ + + +/*----------------------------------------------------------------*/ +/*--- ---*/ +/*----------------------------------------------------------------*/ + +/* This has to do with printing error messages. See comments on + announce_threadset() and summarise_threadset(). Perhaps it + should be a command line option. */ +#define N_THREADS_TO_ANNOUNCE 5 + + +/*----------------------------------------------------------------*/ +/*--- Error management ---*/ +/*----------------------------------------------------------------*/ + +/* maps (by value) strings to a copy of them in ARENA_TOOL */ + +static WordFM* string_table = NULL; + +ULong HG_(stats__string_table_queries) = 0; + +ULong HG_(stats__string_table_get_map_size) ( void ) { + return string_table ? (ULong)VG_(sizeFM)(string_table) : 0; +} + +static Word string_table_cmp ( UWord s1, UWord s2 ) { + return (Word)VG_(strcmp)( (HChar*)s1, (HChar*)s2 ); +} + +static HChar* string_table_strdup ( HChar* str ) { + HChar* copy = NULL; + HG_(stats__string_table_queries)++; + if (!str) + str = "(null)"; + if (!string_table) { + string_table = VG_(newFM)( HG_(zalloc), "hg.sts.1", + HG_(free), string_table_cmp ); + tl_assert(string_table); + } + if (VG_(lookupFM)( string_table, + NULL, (Word*)©, (Word)str )) { + tl_assert(copy); + if (0) VG_(printf)("string_table_strdup: %p -> %p\n", str, copy ); + return copy; + } else { + copy = HG_(strdup)("hg.sts.2", str); + tl_assert(copy); + VG_(addToFM)( string_table, (Word)copy, (Word)copy ); + return copy; + } +} + +/* maps from Lock .unique fields to LockP*s */ + +static WordFM* map_LockN_to_P = NULL; + +ULong HG_(stats__LockN_to_P_queries) = 0; + +ULong HG_(stats__LockN_to_P_get_map_size) ( void ) { + return map_LockN_to_P ? (ULong)VG_(sizeFM)(map_LockN_to_P) : 0; +} + +static Word lock_unique_cmp ( UWord lk1W, UWord lk2W ) +{ + Lock* lk1 = (Lock*)lk1W; + Lock* lk2 = (Lock*)lk2W; + tl_assert( HG_(is_sane_LockNorP)(lk1) ); + tl_assert( HG_(is_sane_LockNorP)(lk2) ); + if (lk1->unique < lk2->unique) return -1; + if (lk1->unique > lk2->unique) return 1; + return 0; +} + +static Lock* mk_LockP_from_LockN ( Lock* lkn ) +{ + Lock* lkp = NULL; + HG_(stats__LockN_to_P_queries)++; + tl_assert( HG_(is_sane_LockN)(lkn) ); + if (!map_LockN_to_P) { + map_LockN_to_P = VG_(newFM)( HG_(zalloc), "hg.mLPfLN.1", + HG_(free), lock_unique_cmp ); + tl_assert(map_LockN_to_P); + } + if (!VG_(lookupFM)( map_LockN_to_P, NULL, (Word*)&lkp, (Word)lkn)) { + lkp = HG_(zalloc)( "hg.mLPfLN.2", sizeof(Lock) ); + *lkp = *lkn; + lkp->admin = NULL; + lkp->magic = LockP_MAGIC; + /* Forget about the bag of lock holders - don't copy that. + Also, acquired_at should be NULL whenever heldBy is, and vice + versa. Also forget about the associated libhb synch object. */ + lkp->heldW = False; + lkp->heldBy = NULL; + lkp->acquired_at = NULL; + lkp->hbso = NULL; + VG_(addToFM)( map_LockN_to_P, (Word)lkp, (Word)lkp ); + } + tl_assert( HG_(is_sane_LockP)(lkp) ); + return lkp; +} + +/* Errors: + + race: program counter + read or write + data size + previous state + current state + + FIXME: how does state printing interact with lockset gc? + Are the locksets in prev/curr state always valid? + Ditto question for the threadsets + ThreadSets - probably are always valid if Threads + are never thrown away. + LockSets - could at least print the lockset elements that + correspond to actual locks at the time of printing. Hmm. +*/ + +/* Error kinds */ +typedef + enum { + XE_Race=1101, // race + XE_FreeMemLock, // freeing memory containing a locked lock + XE_UnlockUnlocked, // unlocking a not-locked lock + XE_UnlockForeign, // unlocking a lock held by some other thread + XE_UnlockBogus, // unlocking an address not known to be a lock + XE_PthAPIerror, // error from the POSIX pthreads API + XE_LockOrder, // lock order error + XE_Misc // misc other error (w/ string to describe it) + } + XErrorTag; + +/* Extra contexts for kinds */ +typedef + struct { + XErrorTag tag; + union { + struct { + Addr data_addr; + Int szB; + Bool isWrite; + ExeContext* mb_lastlock; + ExeContext* mb_confacc; + Thread* thr; + Thread* mb_confaccthr; + Int mb_confaccSzB; + Bool mb_confaccIsW; + Char descr1[96]; + Char descr2[96]; + } Race; + struct { + Thread* thr; /* doing the freeing */ + Lock* lock; /* lock which is locked */ + } FreeMemLock; + struct { + Thread* thr; /* doing the unlocking */ + Lock* lock; /* lock (that is already unlocked) */ + } UnlockUnlocked; + struct { + Thread* thr; /* doing the unlocking */ + Thread* owner; /* thread that actually holds the lock */ + Lock* lock; /* lock (that is held by 'owner') */ + } UnlockForeign; + struct { + Thread* thr; /* doing the unlocking */ + Addr lock_ga; /* purported address of the lock */ + } UnlockBogus; + struct { + Thread* thr; + HChar* fnname; /* persistent, in tool-arena */ + Word err; /* pth error code */ + HChar* errstr; /* persistent, in tool-arena */ + } PthAPIerror; + struct { + Thread* thr; + Addr before_ga; /* always locked first in prog. history */ + Addr after_ga; + ExeContext* before_ec; + ExeContext* after_ec; + } LockOrder; + struct { + Thread* thr; + HChar* errstr; /* persistent, in tool-arena */ + } Misc; + } XE; + } + XError; + +static void init_XError ( XError* xe ) { + VG_(memset)(xe, 0, sizeof(*xe) ); + xe->tag = XE_Race-1; /* bogus */ +} + + +/* Extensions of suppressions */ +typedef + enum { + XS_Race=1201, /* race */ + XS_FreeMemLock, + XS_UnlockUnlocked, + XS_UnlockForeign, + XS_UnlockBogus, + XS_PthAPIerror, + XS_LockOrder, + XS_Misc + } + XSuppTag; + + +/* Updates the copy with address info if necessary. */ +UInt HG_(update_extra) ( Error* err ) +{ + XError* xe = (XError*)VG_(get_error_extra)(err); + tl_assert(xe); + //if (extra != NULL && Undescribed == extra->addrinfo.akind) { + // describe_addr ( VG_(get_error_address)(err), &(extra->addrinfo) ); + //} + + if (xe->tag == XE_Race) { + /* See if we can come up with a source level description of the + raced-upon address. This is potentially expensive, which is + why it's only done at the update_extra point, not when the + error is initially created. */ + static Int xxx = 0; + xxx++; + if (0) + VG_(printf)("HG_(update_extra): " + "%d conflicting-event queries\n", xxx); + tl_assert(sizeof(xe->XE.Race.descr1) == sizeof(xe->XE.Race.descr2)); + if (VG_(get_data_description)( + &xe->XE.Race.descr1[0], + &xe->XE.Race.descr2[0], + sizeof(xe->XE.Race.descr1)-1, + xe->XE.Race.data_addr )) { + tl_assert( xe->XE.Race.descr1 + [ sizeof(xe->XE.Race.descr1)-1 ] == 0); + tl_assert( xe->XE.Race.descr2 + [ sizeof(xe->XE.Race.descr2)-1 ] == 0); + } + { Thr* thrp = NULL; + ExeContext* wherep = NULL; + Addr acc_addr = xe->XE.Race.data_addr; + Int acc_szB = xe->XE.Race.szB; + Thr* acc_thr = xe->XE.Race.thr->hbthr; + Bool acc_isW = xe->XE.Race.isWrite; + SizeT conf_szB = 0; + Bool conf_isW = False; + tl_assert(!xe->XE.Race.mb_confacc); + tl_assert(!xe->XE.Race.mb_confaccthr); + if (libhb_event_map_lookup( + &wherep, &thrp, &conf_szB, &conf_isW, + acc_thr, acc_addr, acc_szB, acc_isW )) { + Thread* threadp; + tl_assert(wherep); + tl_assert(thrp); + threadp = libhb_get_Thr_opaque( thrp ); + tl_assert(threadp); + xe->XE.Race.mb_confacc = wherep; + xe->XE.Race.mb_confaccthr = threadp; + xe->XE.Race.mb_confaccSzB = (Int)conf_szB; + xe->XE.Race.mb_confaccIsW = conf_isW; + } + } + } + + return sizeof(XError); +} + +void HG_(record_error_Race) ( Thread* thr, + Addr data_addr, Int szB, Bool isWrite, + ExeContext* mb_lastlock ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + +# if defined(VGO_linux) + /* Skip any races on locations apparently in GOTPLT sections. This + is said to be caused by ld.so poking PLT table entries (or + whatever) when it writes the resolved address of a dynamically + linked routine, into the table (or whatever) when it is called + for the first time. */ + { + VgSectKind sect = VG_(seginfo_sect_kind)( NULL, 0, data_addr ); + if (0) VG_(printf)("XXXXXXXXX RACE on %#lx %s\n", + data_addr, VG_(pp_SectKind)(sect)); + /* SectPLT is required on ???-linux */ + if (sect == Vg_SectGOTPLT) return; + /* SectPLT is required on ppc32/64-linux */ + if (sect == Vg_SectPLT) return; + } +# endif + + init_XError(&xe); + xe.tag = XE_Race; + xe.XE.Race.data_addr = data_addr; + xe.XE.Race.szB = szB; + xe.XE.Race.isWrite = isWrite; + xe.XE.Race.mb_lastlock = mb_lastlock; + xe.XE.Race.thr = thr; + tl_assert(isWrite == False || isWrite == True); + tl_assert(szB == 8 || szB == 4 || szB == 2 || szB == 1); + xe.XE.Race.descr1[0] = xe.XE.Race.descr2[0] = 0; + // FIXME: tid vs thr + // Skip on any of the conflicting-access info at this point. + // It's expensive to obtain, and this error is more likely than + // not to be discarded. We'll fill these fields in in + // HG_(update_extra) just above, assuming the error ever makes + // it that far (unlikely). + xe.XE.Race.mb_confaccSzB = 0; + xe.XE.Race.mb_confaccIsW = False; + xe.XE.Race.mb_confacc = NULL; + xe.XE.Race.mb_confaccthr = NULL; + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_Race, data_addr, NULL, &xe ); +} + +void HG_(record_error_FreeMemLock) ( Thread* thr, Lock* lk ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + tl_assert( HG_(is_sane_LockN)(lk) ); + init_XError(&xe); + xe.tag = XE_FreeMemLock; + xe.XE.FreeMemLock.thr = thr; + xe.XE.FreeMemLock.lock = mk_LockP_from_LockN(lk); + // FIXME: tid vs thr + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_FreeMemLock, 0, NULL, &xe ); +} + +void HG_(record_error_UnlockUnlocked) ( Thread* thr, Lock* lk ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + tl_assert( HG_(is_sane_LockN)(lk) ); + init_XError(&xe); + xe.tag = XE_UnlockUnlocked; + xe.XE.UnlockUnlocked.thr = thr; + xe.XE.UnlockUnlocked.lock = mk_LockP_from_LockN(lk); + // FIXME: tid vs thr + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_UnlockUnlocked, 0, NULL, &xe ); +} + +void HG_(record_error_UnlockForeign) ( Thread* thr, + Thread* owner, Lock* lk ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + tl_assert( HG_(is_sane_Thread)(owner) ); + tl_assert( HG_(is_sane_LockN)(lk) ); + init_XError(&xe); + xe.tag = XE_UnlockForeign; + xe.XE.UnlockForeign.thr = thr; + xe.XE.UnlockForeign.owner = owner; + xe.XE.UnlockForeign.lock = mk_LockP_from_LockN(lk); + // FIXME: tid vs thr + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_UnlockForeign, 0, NULL, &xe ); +} + +void HG_(record_error_UnlockBogus) ( Thread* thr, Addr lock_ga ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + init_XError(&xe); + xe.tag = XE_UnlockBogus; + xe.XE.UnlockBogus.thr = thr; + xe.XE.UnlockBogus.lock_ga = lock_ga; + // FIXME: tid vs thr + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_UnlockBogus, 0, NULL, &xe ); +} + +void HG_(record_error_LockOrder)( + Thread* thr, Addr before_ga, Addr after_ga, + ExeContext* before_ec, ExeContext* after_ec + ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + if (!HG_(clo_track_lockorders)) + return; + init_XError(&xe); + xe.tag = XE_LockOrder; + xe.XE.LockOrder.thr = thr; + xe.XE.LockOrder.before_ga = before_ga; + xe.XE.LockOrder.before_ec = before_ec; + xe.XE.LockOrder.after_ga = after_ga; + xe.XE.LockOrder.after_ec = after_ec; + // FIXME: tid vs thr + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_LockOrder, 0, NULL, &xe ); +} + +void HG_(record_error_PthAPIerror) ( Thread* thr, HChar* fnname, + Word err, HChar* errstr ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + tl_assert(fnname); + tl_assert(errstr); + init_XError(&xe); + xe.tag = XE_PthAPIerror; + xe.XE.PthAPIerror.thr = thr; + xe.XE.PthAPIerror.fnname = string_table_strdup(fnname); + xe.XE.PthAPIerror.err = err; + xe.XE.PthAPIerror.errstr = string_table_strdup(errstr); + // FIXME: tid vs thr + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_PthAPIerror, 0, NULL, &xe ); +} + +void HG_(record_error_Misc) ( Thread* thr, HChar* errstr ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + tl_assert(errstr); + init_XError(&xe); + xe.tag = XE_Misc; + xe.XE.Misc.thr = thr; + xe.XE.Misc.errstr = string_table_strdup(errstr); + // FIXME: tid vs thr + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_Misc, 0, NULL, &xe ); +} + +Bool HG_(eq_Error) ( VgRes not_used, Error* e1, Error* e2 ) +{ + XError *xe1, *xe2; + + tl_assert(VG_(get_error_kind)(e1) == VG_(get_error_kind)(e2)); + + xe1 = (XError*)VG_(get_error_extra)(e1); + xe2 = (XError*)VG_(get_error_extra)(e2); + tl_assert(xe1); + tl_assert(xe2); + + switch (VG_(get_error_kind)(e1)) { + case XE_Race: + return xe1->XE.Race.szB == xe2->XE.Race.szB + && xe1->XE.Race.isWrite == xe2->XE.Race.isWrite + && (HG_(clo_cmp_race_err_addrs) + ? xe1->XE.Race.data_addr == xe2->XE.Race.data_addr + : True); + case XE_FreeMemLock: + return xe1->XE.FreeMemLock.thr == xe2->XE.FreeMemLock.thr + && xe1->XE.FreeMemLock.lock == xe2->XE.FreeMemLock.lock; + case XE_UnlockUnlocked: + return xe1->XE.UnlockUnlocked.thr == xe2->XE.UnlockUnlocked.thr + && xe1->XE.UnlockUnlocked.lock == xe2->XE.UnlockUnlocked.lock; + case XE_UnlockForeign: + return xe1->XE.UnlockForeign.thr == xe2->XE.UnlockForeign.thr + && xe1->XE.UnlockForeign.owner == xe2->XE.UnlockForeign.owner + && xe1->XE.UnlockForeign.lock == xe2->XE.UnlockForeign.lock; + case XE_UnlockBogus: + return xe1->XE.UnlockBogus.thr == xe2->XE.UnlockBogus.thr + && xe1->XE.UnlockBogus.lock_ga == xe2->XE.UnlockBogus.lock_ga; + case XE_PthAPIerror: + return xe1->XE.PthAPIerror.thr == xe2->XE.PthAPIerror.thr + && 0==VG_(strcmp)(xe1->XE.PthAPIerror.fnname, + xe2->XE.PthAPIerror.fnname) + && xe1->XE.PthAPIerror.err == xe2->XE.PthAPIerror.err; + case XE_LockOrder: + return xe1->XE.LockOrder.thr == xe2->XE.LockOrder.thr; + case XE_Misc: + return xe1->XE.Misc.thr == xe2->XE.Misc.thr + && 0==VG_(strcmp)(xe1->XE.Misc.errstr, xe2->XE.Misc.errstr); + default: + tl_assert(0); + } + + /*NOTREACHED*/ + tl_assert(0); +} + + +/* Announce (that is, print the point-of-creation) of 'thr'. Only do + this once, as we only want to see these announcements once per + thread. */ +static void announce_one_thread ( Thread* thr ) +{ + tl_assert(HG_(is_sane_Thread)(thr)); + tl_assert(thr->errmsg_index >= 1); + if (!thr->announced) { + if (thr->errmsg_index == 1) { + tl_assert(thr->created_at == NULL); + VG_(message)(Vg_UserMsg, "Thread #%d is the program's root thread", + thr->errmsg_index); + } else { + tl_assert(thr->created_at != NULL); + VG_(message)(Vg_UserMsg, "Thread #%d was created", + thr->errmsg_index); + VG_(pp_ExeContext)( thr->created_at ); + } + VG_(message)(Vg_UserMsg, ""); + thr->announced = True; + } +} + + +void HG_(pp_Error) ( Error* err ) +{ + XError *xe = (XError*)VG_(get_error_extra)(err); + + switch (VG_(get_error_kind)(err)) { + + case XE_Misc: { + tl_assert(xe); + tl_assert( HG_(is_sane_Thread)( xe->XE.Misc.thr ) ); + announce_one_thread( xe->XE.Misc.thr ); + VG_(message)(Vg_UserMsg, + "Thread #%d: %s", + (Int)xe->XE.Misc.thr->errmsg_index, + xe->XE.Misc.errstr); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + break; + } + + case XE_LockOrder: { + tl_assert(xe); + tl_assert( HG_(is_sane_Thread)( xe->XE.LockOrder.thr ) ); + announce_one_thread( xe->XE.LockOrder.thr ); + VG_(message)(Vg_UserMsg, + "Thread #%d: lock order \"%p before %p\" violated", + (Int)xe->XE.LockOrder.thr->errmsg_index, + (void*)xe->XE.LockOrder.before_ga, + (void*)xe->XE.LockOrder.after_ga); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + if (xe->XE.LockOrder.before_ec && xe->XE.LockOrder.after_ec) { + VG_(message)(Vg_UserMsg, + " Required order was established by acquisition of lock at %p", + (void*)xe->XE.LockOrder.before_ga); + VG_(pp_ExeContext)( xe->XE.LockOrder.before_ec ); + VG_(message)(Vg_UserMsg, + " followed by a later acquisition of lock at %p", + (void*)xe->XE.LockOrder.after_ga); + VG_(pp_ExeContext)( xe->XE.LockOrder.after_ec ); + } + break; + } + + case XE_PthAPIerror: { + tl_assert(xe); + tl_assert( HG_(is_sane_Thread)( xe->XE.PthAPIerror.thr ) ); + announce_one_thread( xe->XE.PthAPIerror.thr ); + VG_(message)(Vg_UserMsg, + "Thread #%d's call to %s failed", + (Int)xe->XE.PthAPIerror.thr->errmsg_index, + xe->XE.PthAPIerror.fnname); + VG_(message)(Vg_UserMsg, + " with error code %ld (%s)", + xe->XE.PthAPIerror.err, + xe->XE.PthAPIerror.errstr); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + break; + } + + case XE_UnlockBogus: { + tl_assert(xe); + tl_assert( HG_(is_sane_Thread)( xe->XE.UnlockBogus.thr ) ); + announce_one_thread( xe->XE.UnlockBogus.thr ); + VG_(message)(Vg_UserMsg, + "Thread #%d unlocked an invalid lock at %p ", + (Int)xe->XE.UnlockBogus.thr->errmsg_index, + (void*)xe->XE.UnlockBogus.lock_ga); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + break; + } + + case XE_UnlockForeign: { + tl_assert(xe); + tl_assert( HG_(is_sane_LockP)( xe->XE.UnlockForeign.lock ) ); + tl_assert( HG_(is_sane_Thread)( xe->XE.UnlockForeign.owner ) ); + tl_assert( HG_(is_sane_Thread)( xe->XE.UnlockForeign.thr ) ); + announce_one_thread( xe->XE.UnlockForeign.thr ); + announce_one_thread( xe->XE.UnlockForeign.owner ); + VG_(message)(Vg_UserMsg, + "Thread #%d unlocked lock at %p " + "currently held by thread #%d", + (Int)xe->XE.UnlockForeign.thr->errmsg_index, + (void*)xe->XE.UnlockForeign.lock->guestaddr, + (Int)xe->XE.UnlockForeign.owner->errmsg_index ); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + if (xe->XE.UnlockForeign.lock->appeared_at) { + VG_(message)(Vg_UserMsg, + " Lock at %p was first observed", + (void*)xe->XE.UnlockForeign.lock->guestaddr); + VG_(pp_ExeContext)( xe->XE.UnlockForeign.lock->appeared_at ); + } + break; + } + + case XE_UnlockUnlocked: { + tl_assert(xe); + tl_assert( HG_(is_sane_LockP)( xe->XE.UnlockUnlocked.lock ) ); + tl_assert( HG_(is_sane_Thread)( xe->XE.UnlockUnlocked.thr ) ); + announce_one_thread( xe->XE.UnlockUnlocked.thr ); + VG_(message)(Vg_UserMsg, + "Thread #%d unlocked a not-locked lock at %p ", + (Int)xe->XE.UnlockUnlocked.thr->errmsg_index, + (void*)xe->XE.UnlockUnlocked.lock->guestaddr); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + if (xe->XE.UnlockUnlocked.lock->appeared_at) { + VG_(message)(Vg_UserMsg, + " Lock at %p was first observed", + (void*)xe->XE.UnlockUnlocked.lock->guestaddr); + VG_(pp_ExeContext)( xe->XE.UnlockUnlocked.lock->appeared_at ); + } + break; + } + + case XE_FreeMemLock: { + tl_assert(xe); + tl_assert( HG_(is_sane_LockP)( xe->XE.FreeMemLock.lock ) ); + tl_assert( HG_(is_sane_Thread)( xe->XE.FreeMemLock.thr ) ); + announce_one_thread( xe->XE.FreeMemLock.thr ); + VG_(message)(Vg_UserMsg, + "Thread #%d deallocated location %p " + "containing a locked lock", + (Int)xe->XE.FreeMemLock.thr->errmsg_index, + (void*)xe->XE.FreeMemLock.lock->guestaddr); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + if (xe->XE.FreeMemLock.lock->appeared_at) { + VG_(message)(Vg_UserMsg, + " Lock at %p was first observed", + (void*)xe->XE.FreeMemLock.lock->guestaddr); + VG_(pp_ExeContext)( xe->XE.FreeMemLock.lock->appeared_at ); + } + break; + } + + case XE_Race: { + Addr err_ga; + HChar* what; + Int szB; + what = xe->XE.Race.isWrite ? "write" : "read"; + szB = xe->XE.Race.szB; + err_ga = VG_(get_error_address)(err); + + announce_one_thread( xe->XE.Race.thr ); + if (xe->XE.Race.mb_confaccthr) + announce_one_thread( xe->XE.Race.mb_confaccthr ); + VG_(message)(Vg_UserMsg, + "Possible data race during %s of size %d at %#lx by thread #%d", + what, szB, err_ga, (Int)xe->XE.Race.thr->errmsg_index + ); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + if (xe->XE.Race.mb_confacc) { + if (xe->XE.Race.mb_confaccthr) { + VG_(message)(Vg_UserMsg, + " This conflicts with a previous %s of size %d by thread #%d", + xe->XE.Race.mb_confaccIsW ? "write" : "read", + xe->XE.Race.mb_confaccSzB, + xe->XE.Race.mb_confaccthr->errmsg_index + ); + } else { + // FIXME: can this ever happen? + VG_(message)(Vg_UserMsg, + " This conflicts with a previous %s of size %d", + xe->XE.Race.mb_confaccIsW ? "write" : "read", + xe->XE.Race.mb_confaccSzB + ); + } + VG_(pp_ExeContext)( xe->XE.Race.mb_confacc ); + } + + + /* If we have a better description of the address, show it. */ + if (xe->XE.Race.descr1[0] != 0) + VG_(message)(Vg_UserMsg, " %s", &xe->XE.Race.descr1[0]); + if (xe->XE.Race.descr2[0] != 0) + VG_(message)(Vg_UserMsg, " %s", &xe->XE.Race.descr2[0]); + + break; /* case XE_Race */ + } /* case XE_Race */ + + default: + tl_assert(0); + } /* switch (VG_(get_error_kind)(err)) */ +} + +Char* HG_(get_error_name) ( Error* err ) +{ + switch (VG_(get_error_kind)(err)) { + case XE_Race: return "Race"; + case XE_FreeMemLock: return "FreeMemLock"; + case XE_UnlockUnlocked: return "UnlockUnlocked"; + case XE_UnlockForeign: return "UnlockForeign"; + case XE_UnlockBogus: return "UnlockBogus"; + case XE_PthAPIerror: return "PthAPIerror"; + case XE_LockOrder: return "LockOrder"; + case XE_Misc: return "Misc"; + default: tl_assert(0); /* fill in missing case */ + } +} + +Bool HG_(recognised_suppression) ( Char* name, Supp *su ) +{ +# define TRY(_name,_xskind) \ + if (0 == VG_(strcmp)(name, (_name))) { \ + VG_(set_supp_kind)(su, (_xskind)); \ + return True; \ + } + TRY("Race", XS_Race); + TRY("FreeMemLock", XS_FreeMemLock); + TRY("UnlockUnlocked", XS_UnlockUnlocked); + TRY("UnlockForeign", XS_UnlockForeign); + TRY("UnlockBogus", XS_UnlockBogus); + TRY("PthAPIerror", XS_PthAPIerror); + TRY("LockOrder", XS_LockOrder); + TRY("Misc", XS_Misc); + return False; +# undef TRY +} + +Bool HG_(read_extra_suppression_info) ( Int fd, Char* buf, Int nBuf, + Supp* su ) +{ + /* do nothing -- no extra suppression info present. Return True to + indicate nothing bad happened. */ + return True; +} + +Bool HG_(error_matches_suppression) ( Error* err, Supp* su ) +{ + switch (VG_(get_supp_kind)(su)) { + case XS_Race: return VG_(get_error_kind)(err) == XE_Race; + case XS_FreeMemLock: return VG_(get_error_kind)(err) == XE_FreeMemLock; + case XS_UnlockUnlocked: return VG_(get_error_kind)(err) == XE_UnlockUnlocked; + case XS_UnlockForeign: return VG_(get_error_kind)(err) == XE_UnlockForeign; + case XS_UnlockBogus: return VG_(get_error_kind)(err) == XE_UnlockBogus; + case XS_PthAPIerror: return VG_(get_error_kind)(err) == XE_PthAPIerror; + case XS_LockOrder: return VG_(get_error_kind)(err) == XE_LockOrder; + case XS_Misc: return VG_(get_error_kind)(err) == XE_Misc; + //case XS_: return VG_(get_error_kind)(err) == XE_; + default: tl_assert(0); /* fill in missing cases */ + } +} + +void HG_(print_extra_suppression_info) ( Error* err ) +{ + /* Do nothing */ +} + + +/*--------------------------------------------------------------------*/ +/*--- end hg_errors.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/.svn/text-base/hg_errors.h.svn-base b/helgrind/.svn/text-base/hg_errors.h.svn-base new file mode 100644 index 0000000..a45173a --- /dev/null +++ b/helgrind/.svn/text-base/hg_errors.h.svn-base @@ -0,0 +1,71 @@ + +/*--------------------------------------------------------------------*/ +/*--- Error management for Helgrind. ---*/ +/*--- hg_errors.h ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#ifndef __HG_ERRORS_H +#define __HG_ERRORS_H + + +/* The standard bundle of error management functions that we are +required to present to the core/tool interface at startup. */ +Bool HG_(eq_Error) ( VgRes not_used, Error* e1, Error* e2 ); +void HG_(pp_Error) ( Error* err ); +UInt HG_(update_extra) ( Error* err ); +Bool HG_(recognised_suppression) ( Char* name, Supp *su ); +Bool HG_(read_extra_suppression_info) ( Int fd, Char* buf, Int nBuf, + Supp* su ); +Bool HG_(error_matches_suppression) ( Error* err, Supp* su ); +Char* HG_(get_error_name) ( Error* err ); +void HG_(print_extra_suppression_info) ( Error* err ); + +/* Functions for recording various kinds of errors. */ +void HG_(record_error_Race) ( Thread* thr, + Addr data_addr, Int szB, Bool isWrite, + ExeContext* mb_lastlock ); +void HG_(record_error_FreeMemLock) ( Thread* thr, Lock* lk ); +void HG_(record_error_UnlockUnlocked) ( Thread*, Lock* ); +void HG_(record_error_UnlockForeign) ( Thread*, Thread*, Lock* ); +void HG_(record_error_UnlockBogus) ( Thread*, Addr ); +void HG_(record_error_PthAPIerror) ( Thread*, HChar*, Word, HChar* ); +void HG_(record_error_LockOrder) ( Thread*, Addr, Addr, + ExeContext*, ExeContext* ); +void HG_(record_error_Misc) ( Thread*, HChar* ); + +/* Statistics pertaining to error management. */ +extern ULong HG_(stats__LockN_to_P_queries); +extern ULong HG_(stats__LockN_to_P_get_map_size) ( void ); +extern ULong HG_(stats__string_table_queries); +extern ULong HG_(stats__string_table_get_map_size) ( void ); + +#endif /* ! __HG_ERRORS_H */ + +/*--------------------------------------------------------------------*/ +/*--- end hg_errors.h ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/.svn/text-base/hg_intercepts.c.svn-base b/helgrind/.svn/text-base/hg_intercepts.c.svn-base new file mode 100644 index 0000000..c2ea907 --- /dev/null +++ b/helgrind/.svn/text-base/hg_intercepts.c.svn-base @@ -0,0 +1,1734 @@ + +/*--------------------------------------------------------------------*/ +/*--- pthread intercepts for thread checking. ---*/ +/*--- tc_intercepts.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks LLP + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. + + Neither the names of the U.S. Department of Energy nor the + University of California nor the names of its contributors may be + used to endorse or promote products derived from this software + without prior written permission. +*/ + +/* RUNS ON SIMULATED CPU + Interceptors for pthread_* functions, so that tc_main can see + significant thread events. + + Important: when adding a function wrapper to this file, remember to + add a test case to tc20_verifywrap.c. A common cause of failure is + for wrappers to not engage on different distros, and + tc20_verifywrap essentially checks that each wrapper is really + doing something. +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_redir.h" +#include "valgrind.h" +#include "helgrind.h" + +#define TRACE_PTH_FNS 0 +#define TRACE_QT4_FNS 0 + + +/*----------------------------------------------------------------*/ +/*--- ---*/ +/*----------------------------------------------------------------*/ + +#define PTH_FUNC(ret_ty, f, args...) \ + ret_ty I_WRAP_SONAME_FNNAME_ZZ(libpthreadZdsoZd0,f)(args); \ + ret_ty I_WRAP_SONAME_FNNAME_ZZ(libpthreadZdsoZd0,f)(args) + +// Do a client request. This is a macro rather than a function +// so as to avoid having an extra function in the stack trace. + +#define DO_CREQ_v_W(_creqF, _ty1F,_arg1F) \ + do { \ + Word _unused_res, _arg1; \ + assert(sizeof(_ty1F) == sizeof(Word)); \ + _arg1 = (Word)(_arg1F); \ + VALGRIND_DO_CLIENT_REQUEST(_unused_res, 0, \ + (_creqF), \ + _arg1, 0,0,0,0); \ + } while (0) + +#define DO_CREQ_v_WW(_creqF, _ty1F,_arg1F, _ty2F,_arg2F) \ + do { \ + Word _unused_res, _arg1, _arg2; \ + assert(sizeof(_ty1F) == sizeof(Word)); \ + assert(sizeof(_ty2F) == sizeof(Word)); \ + _arg1 = (Word)(_arg1F); \ + _arg2 = (Word)(_arg2F); \ + VALGRIND_DO_CLIENT_REQUEST(_unused_res, 0, \ + (_creqF), \ + _arg1,_arg2,0,0,0); \ + } while (0) + +#define DO_CREQ_W_WW(_resF, _creqF, _ty1F,_arg1F, _ty2F,_arg2F) \ + do { \ + Word _res, _arg1, _arg2; \ + assert(sizeof(_ty1F) == sizeof(Word)); \ + assert(sizeof(_ty2F) == sizeof(Word)); \ + _arg1 = (Word)(_arg1F); \ + _arg2 = (Word)(_arg2F); \ + VALGRIND_DO_CLIENT_REQUEST(_res, 2, \ + (_creqF), \ + _arg1,_arg2,0,0,0); \ + _resF = _res; \ + } while (0) + +#define DO_CREQ_v_WWW(_creqF, _ty1F,_arg1F, \ + _ty2F,_arg2F, _ty3F, _arg3F) \ + do { \ + Word _unused_res, _arg1, _arg2, _arg3; \ + assert(sizeof(_ty1F) == sizeof(Word)); \ + assert(sizeof(_ty2F) == sizeof(Word)); \ + assert(sizeof(_ty3F) == sizeof(Word)); \ + _arg1 = (Word)(_arg1F); \ + _arg2 = (Word)(_arg2F); \ + _arg3 = (Word)(_arg3F); \ + VALGRIND_DO_CLIENT_REQUEST(_unused_res, 0, \ + (_creqF), \ + _arg1,_arg2,_arg3,0,0); \ + } while (0) + + +#define DO_PthAPIerror(_fnnameF, _errF) \ + do { \ + char* _fnname = (char*)(_fnnameF); \ + long _err = (long)(int)(_errF); \ + char* _errstr = lame_strerror(_err); \ + DO_CREQ_v_WWW(_VG_USERREQ__HG_PTH_API_ERROR, \ + char*,_fnname, \ + long,_err, char*,_errstr); \ + } while (0) + + +/* Needed for older glibcs (2.3 and older, at least) who don't + otherwise "know" about pthread_rwlock_anything or about + PTHREAD_MUTEX_RECURSIVE (amongst things). */ +#define _GNU_SOURCE 1 + +#include <stdio.h> +#include <assert.h> +#include <errno.h> +#include <pthread.h> + + +/* A lame version of strerror which doesn't use the real libc + strerror_r, since using the latter just generates endless more + threading errors (glibc goes off and does tons of crap w.r.t. + locales etc) */ +static char* lame_strerror ( long err ) +{ switch (err) { + case EPERM: return "EPERM: Operation not permitted"; + case ENOENT: return "ENOENT: No such file or directory"; + case ESRCH: return "ESRCH: No such process"; + case EINTR: return "EINTR: Interrupted system call"; + case EBADF: return "EBADF: Bad file number"; + case EAGAIN: return "EAGAIN: Try again"; + case ENOMEM: return "ENOMEM: Out of memory"; + case EACCES: return "EACCES: Permission denied"; + case EFAULT: return "EFAULT: Bad address"; + case EEXIST: return "EEXIST: File exists"; + case EINVAL: return "EINVAL: Invalid argument"; + case EMFILE: return "EMFILE: Too many open files"; + case ENOSYS: return "ENOSYS: Function not implemented"; + case EOVERFLOW: return "EOVERFLOW: Value too large " + "for defined data type"; + case EBUSY: return "EBUSY: Device or resource busy"; + case ETIMEDOUT: return "ETIMEDOUT: Connection timed out"; + case EDEADLK: return "EDEADLK: Resource deadlock would occur"; + case EOPNOTSUPP: return "EOPNOTSUPP: Operation not supported on " + "transport endpoint"; /* honest, guv */ + default: return "tc_intercepts.c: lame_strerror(): " + "unhandled case -- please fix me!"; + } +} + + +/*----------------------------------------------------------------*/ +/*--- pthread_create, pthread_join, pthread_exit ---*/ +/*----------------------------------------------------------------*/ + +/* Do not rename this function. It contains an unavoidable race and + so is mentioned by name in glibc-*helgrind*.supp. */ +static void* mythread_wrapper ( void* xargsV ) +{ + volatile Word* xargs = (volatile Word*) xargsV; + void*(*fn)(void*) = (void*(*)(void*))xargs[0]; + void* arg = (void*)xargs[1]; + pthread_t me = pthread_self(); + /* Tell the tool what my pthread_t is. */ + DO_CREQ_v_W(_VG_USERREQ__HG_SET_MY_PTHREAD_T, pthread_t,me); + /* allow the parent to proceed. We can't let it proceed until + we're ready because (1) we need to make sure it doesn't exit and + hence deallocate xargs[] while we still need it, and (2) we + don't want either parent nor child to proceed until the tool has + been notified of the child's pthread_t. */ + xargs[2] = 0; + /* Now we can no longer safely use xargs[]. */ + return (void*) fn( (void*)arg ); +} + +// pthread_create +PTH_FUNC(int, pthreadZucreateZAZa, // pthread_create@* + pthread_t *thread, const pthread_attr_t *attr, + void *(*start) (void *), void *arg) +{ + int ret; + OrigFn fn; + volatile Word xargs[3]; + + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_create wrapper"); fflush(stderr); + } + xargs[0] = (Word)start; + xargs[1] = (Word)arg; + xargs[2] = 1; /* serves as a spinlock -- sigh */ + + CALL_FN_W_WWWW(ret, fn, thread,attr,mythread_wrapper,&xargs[0]); + + if (ret == 0) { + /* we have to wait for the child to notify the tool of its + pthread_t before continuing */ + while (xargs[2] != 0) { + /* Do nothing. We need to spin until the child writes to + xargs[2]. However, that can lead to starvation in the + child and very long delays (eg, tc19_shadowmem on + ppc64-linux Fedora Core 6). So yield the cpu if we can, + to let the child run at the earliest available + opportunity. */ + sched_yield(); + } + } else { + DO_PthAPIerror( "pthread_create", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: pth_create -> %d >>\n", ret); + } + return ret; +} + +// pthread_join +PTH_FUNC(int, pthreadZujoin, // pthread_join + pthread_t thread, void** value_pointer) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_join wrapper"); fflush(stderr); + } + + CALL_FN_W_WW(ret, fn, thread,value_pointer); + + /* At least with NPTL as the thread library, this is safe because + it is guaranteed (by NPTL) that the joiner will completely gone + before pthread_join (the original) returns. See email below.*/ + if (ret == 0 /*success*/) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_JOIN_POST, pthread_t,thread); + } else { + DO_PthAPIerror( "pthread_join", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: pth_join -> %d >>\n", ret); + } + return ret; +} + +/* Behaviour of pthread_join on NPTL: + +Me: +I have a question re the NPTL pthread_join implementation. + + Suppose I am the thread 'stayer'. + + If I call pthread_join(quitter), is it guaranteed that the + thread 'quitter' has really exited before pthread_join returns? + + IOW, is it guaranteed that 'quitter' will not execute any further + instructions after pthread_join returns? + +I believe this is true based on the following analysis of +glibc-2.5 sources. However am not 100% sure and would appreciate +confirmation. + + 'quitter' will be running start_thread() in nptl/pthread_create.c + + The last action of start_thread() is to exit via + __exit_thread_inline(0), which simply does sys_exit + (nptl/pthread_create.c:403) + + 'stayer' meanwhile is waiting for lll_wait_tid (pd->tid) + (call at nptl/pthread_join.c:89) + + As per comment at nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h:536, + lll_wait_tid will not return until kernel notifies via futex + wakeup that 'quitter' has terminated. + + Hence pthread_join cannot return until 'quitter' really has + completely disappeared. + +Drepper: +> As per comment at nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h:536, +> lll_wait_tid will not return until kernel notifies via futex +> wakeup that 'quitter' has terminated. +That's the key. The kernel resets the TID field after the thread is +done. No way the joiner can return before the thread is gone. +*/ + + +/*----------------------------------------------------------------*/ +/*--- pthread_mutex_t functions ---*/ +/*----------------------------------------------------------------*/ + +/* Handled: pthread_mutex_init pthread_mutex_destroy + pthread_mutex_lock + pthread_mutex_trylock pthread_mutex_timedlock + pthread_mutex_unlock + + Unhandled: pthread_spin_init pthread_spin_destroy + pthread_spin_lock + pthread_spin_trylock + pthread_spin_unlock +*/ + +// pthread_mutex_init +PTH_FUNC(int, pthreadZumutexZuinit, // pthread_mutex_init + pthread_mutex_t *mutex, + pthread_mutexattr_t* attr) +{ + int ret; + long mbRec; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_mxinit %p", mutex); fflush(stderr); + } + + mbRec = 0; + if (attr) { + int ty, zzz; + zzz = pthread_mutexattr_gettype(attr, &ty); + if (zzz == 0 && ty == PTHREAD_MUTEX_RECURSIVE) + mbRec = 1; + } + + CALL_FN_W_WW(ret, fn, mutex,attr); + + if (ret == 0 /*success*/) { + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_INIT_POST, + pthread_mutex_t*,mutex, long,mbRec); + } else { + DO_PthAPIerror( "pthread_mutex_init", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: mxinit -> %d >>\n", ret); + } + return ret; +} + + +// pthread_mutex_destroy +PTH_FUNC(int, pthreadZumutexZudestroy, // pthread_mutex_destroy + pthread_mutex_t *mutex) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_mxdestroy %p", mutex); fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_DESTROY_PRE, + pthread_mutex_t*,mutex); + + CALL_FN_W_W(ret, fn, mutex); + + if (ret != 0) { + DO_PthAPIerror( "pthread_mutex_destroy", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: mxdestroy -> %d >>\n", ret); + } + return ret; +} + + +// pthread_mutex_lock +PTH_FUNC(int, pthreadZumutexZulock, // pthread_mutex_lock + pthread_mutex_t *mutex) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_mxlock %p", mutex); fflush(stderr); + } + + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, + pthread_mutex_t*,mutex, long,0/*!isTryLock*/); + + CALL_FN_W_W(ret, fn, mutex); + + /* There's a hole here: libpthread now knows the lock is locked, + but the tool doesn't, so some other thread could run and detect + that the lock has been acquired by someone (this thread). Does + this matter? Not sure, but I don't think so. */ + + if (ret == 0 /*success*/) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + pthread_mutex_t*,mutex); + } else { + DO_PthAPIerror( "pthread_mutex_lock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: mxlock -> %d >>\n", ret); + } + return ret; +} + + +// pthread_mutex_trylock. The handling needed here is very similar +// to that for pthread_mutex_lock, except that we need to tell +// the pre-lock creq that this is a trylock-style operation, and +// therefore not to complain if the lock is nonrecursive and +// already locked by this thread -- because then it'll just fail +// immediately with EBUSY. +PTH_FUNC(int, pthreadZumutexZutrylock, // pthread_mutex_trylock + pthread_mutex_t *mutex) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_mxtrylock %p", mutex); fflush(stderr); + } + + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, + pthread_mutex_t*,mutex, long,1/*isTryLock*/); + + CALL_FN_W_W(ret, fn, mutex); + + /* There's a hole here: libpthread now knows the lock is locked, + but the tool doesn't, so some other thread could run and detect + that the lock has been acquired by someone (this thread). Does + this matter? Not sure, but I don't think so. */ + + if (ret == 0 /*success*/) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + pthread_mutex_t*,mutex); + } else { + if (ret != EBUSY) + DO_PthAPIerror( "pthread_mutex_trylock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: mxtrylock -> %d >>\n", ret); + } + return ret; +} + + +// pthread_mutex_timedlock. Identical logic to pthread_mutex_trylock. +PTH_FUNC(int, pthreadZumutexZutimedlock, // pthread_mutex_timedlock + pthread_mutex_t *mutex, + void* timeout) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_mxtimedlock %p %p", mutex, timeout); + fflush(stderr); + } + + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, + pthread_mutex_t*,mutex, long,1/*isTryLock-ish*/); + + CALL_FN_W_WW(ret, fn, mutex,timeout); + + /* There's a hole here: libpthread now knows the lock is locked, + but the tool doesn't, so some other thread could run and detect + that the lock has been acquired by someone (this thread). Does + this matter? Not sure, but I don't think so. */ + + if (ret == 0 /*success*/) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + pthread_mutex_t*,mutex); + } else { + if (ret != ETIMEDOUT) + DO_PthAPIerror( "pthread_mutex_timedlock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: mxtimedlock -> %d >>\n", ret); + } + return ret; +} + + +// pthread_mutex_unlock +PTH_FUNC(int, pthreadZumutexZuunlock, // pthread_mutex_unlock + pthread_mutex_t *mutex) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_mxunlk %p", mutex); fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_PRE, + pthread_mutex_t*,mutex); + + CALL_FN_W_W(ret, fn, mutex); + + if (ret == 0 /*success*/) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_POST, + pthread_mutex_t*,mutex); + } else { + DO_PthAPIerror( "pthread_mutex_unlock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " mxunlk -> %d >>\n", ret); + } + return ret; +} + + +/*----------------------------------------------------------------*/ +/*--- pthread_cond_t functions ---*/ +/*----------------------------------------------------------------*/ + +/* Handled: pthread_cond_wait pthread_cond_timedwait + pthread_cond_signal pthread_cond_broadcast + pthread_cond_destroy + + Unhandled: pthread_cond_init + -- is this important? +*/ + +// pthread_cond_wait +PTH_FUNC(int, pthreadZucondZuwaitZAZa, // pthread_cond_wait@* + pthread_cond_t* cond, pthread_mutex_t* mutex) +{ + int ret; + OrigFn fn; + unsigned long mutex_is_valid; + + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_cond_wait %p %p", cond, mutex); + fflush(stderr); + } + + /* Tell the tool a cond-wait is about to happen, so it can check + for bogus argument values. In return it tells us whether it + thinks the mutex is valid or not. */ + DO_CREQ_W_WW(mutex_is_valid, + _VG_USERREQ__HG_PTHREAD_COND_WAIT_PRE, + pthread_cond_t*,cond, pthread_mutex_t*,mutex); + assert(mutex_is_valid == 1 || mutex_is_valid == 0); + + /* Tell the tool we're about to drop the mutex. This reflects the + fact that in a cond_wait, we show up holding the mutex, and the + call atomically drops the mutex and waits for the cv to be + signalled. */ + if (mutex_is_valid) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_PRE, + pthread_mutex_t*,mutex); + } + + CALL_FN_W_WW(ret, fn, cond,mutex); + + /* these conditionals look stupid, but compare w/ same logic for + pthread_cond_timedwait below */ + if (ret == 0 && mutex_is_valid) { + /* and now we have the mutex again */ + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + pthread_mutex_t*,mutex); + } + + if (ret == 0 && mutex_is_valid) { + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_COND_WAIT_POST, + pthread_cond_t*,cond, pthread_mutex_t*,mutex); + } + + if (ret != 0) { + DO_PthAPIerror( "pthread_cond_wait", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " cowait -> %d >>\n", ret); + } + + return ret; +} + + +// pthread_cond_timedwait +PTH_FUNC(int, pthreadZucondZutimedwaitZAZa, // pthread_cond_timedwait@* + pthread_cond_t* cond, pthread_mutex_t* mutex, + struct timespec* abstime) +{ + int ret; + OrigFn fn; + unsigned long mutex_is_valid; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_cond_timedwait %p %p %p", + cond, mutex, abstime); + fflush(stderr); + } + + /* Tell the tool a cond-wait is about to happen, so it can check + for bogus argument values. In return it tells us whether it + thinks the mutex is valid or not. */ + DO_CREQ_W_WW(mutex_is_valid, + _VG_USERREQ__HG_PTHREAD_COND_WAIT_PRE, + pthread_cond_t*,cond, pthread_mutex_t*,mutex); + assert(mutex_is_valid == 1 || mutex_is_valid == 0); + + /* Tell the tool we're about to drop the mutex. This reflects the + fact that in a cond_wait, we show up holding the mutex, and the + call atomically drops the mutex and waits for the cv to be + signalled. */ + if (mutex_is_valid) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_PRE, + pthread_mutex_t*,mutex); + } + + CALL_FN_W_WWW(ret, fn, cond,mutex,abstime); + + if ((ret == 0 || ret == ETIMEDOUT) && mutex_is_valid) { + /* and now we have the mutex again */ + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + pthread_mutex_t*,mutex); + } + + if (ret == 0 && mutex_is_valid) { + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_COND_WAIT_POST, + pthread_cond_t*,cond, pthread_mutex_t*,mutex); + } + + if (ret != 0 && ret != ETIMEDOUT) { + DO_PthAPIerror( "pthread_cond_timedwait", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " cotimedwait -> %d >>\n", ret); + } + + return ret; +} + + +// pthread_cond_signal +PTH_FUNC(int, pthreadZucondZusignalZAZa, // pthread_cond_signal@* + pthread_cond_t* cond) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_cond_signal %p", cond); + fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_COND_SIGNAL_PRE, + pthread_cond_t*,cond); + + CALL_FN_W_W(ret, fn, cond); + + if (ret != 0) { + DO_PthAPIerror( "pthread_cond_signal", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " cosig -> %d >>\n", ret); + } + + return ret; +} + + +// pthread_cond_broadcast +// Note, this is pretty much identical, from a dependency-graph +// point of view, with cond_signal, so the code is duplicated. +// Maybe it should be commoned up. +PTH_FUNC(int, pthreadZucondZubroadcastZAZa, // pthread_cond_broadcast@* + pthread_cond_t* cond) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_broadcast_signal %p", cond); + fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_COND_BROADCAST_PRE, + pthread_cond_t*,cond); + + CALL_FN_W_W(ret, fn, cond); + + if (ret != 0) { + DO_PthAPIerror( "pthread_cond_broadcast", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " cobro -> %d >>\n", ret); + } + + return ret; +} + + +// pthread_cond_destroy +PTH_FUNC(int, pthreadZucondZudestroyZAZa, // pthread_cond_destroy@* + pthread_cond_t* cond) +{ + int ret; + OrigFn fn; + + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_cond_destroy %p", cond); + fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_COND_DESTROY_PRE, + pthread_cond_t*,cond); + + CALL_FN_W_W(ret, fn, cond); + + if (ret != 0) { + DO_PthAPIerror( "pthread_cond_destroy", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " codestr -> %d >>\n", ret); + } + + return ret; +} + + +/*----------------------------------------------------------------*/ +/*--- pthread_barrier_t functions ---*/ +/*----------------------------------------------------------------*/ + +/* Handled: pthread_barrier_init + pthread_barrier_wait + pthread_barrier_destroy + + Unhandled: pthread_barrierattr_destroy + pthread_barrierattr_getpshared + pthread_barrierattr_init + pthread_barrierattr_setpshared + -- are these important? +*/ + +PTH_FUNC(int, pthreadZubarrierZuinit, // pthread_barrier_init + pthread_barrier_t* bar, + pthread_barrierattr_t* attr, unsigned long count) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_barrier_init %p %p %lu", + bar, attr, count); + fflush(stderr); + } + + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_BARRIER_INIT_PRE, + pthread_barrier_t*,bar, + unsigned long,count); + + CALL_FN_W_WWW(ret, fn, bar,attr,count); + + if (ret != 0) { + DO_PthAPIerror( "pthread_barrier_init", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " pthread_barrier_init -> %d >>\n", ret); + } + + return ret; +} + + +PTH_FUNC(int, pthreadZubarrierZuwait, // pthread_barrier_wait + pthread_barrier_t* bar) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_barrier_wait %p", bar); + fflush(stderr); + } + + /* That this works correctly, and doesn't screw up when a thread + leaving the barrier races round to the front and re-enters while + other threads are still leaving it, is quite subtle. See + comments in the handler for PTHREAD_BARRIER_WAIT_PRE in + hg_main.c. */ + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_BARRIER_WAIT_PRE, + pthread_barrier_t*,bar); + + CALL_FN_W_W(ret, fn, bar); + + if (ret != 0 && ret != PTHREAD_BARRIER_SERIAL_THREAD) { + DO_PthAPIerror( "pthread_barrier_wait", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " pthread_barrier_wait -> %d >>\n", ret); + } + + return ret; +} + + +PTH_FUNC(int, pthreadZubarrierZudestroy, // pthread_barrier_destroy + pthread_barrier_t* bar) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_barrier_destroy %p", bar); + fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_BARRIER_DESTROY_PRE, + pthread_barrier_t*,bar); + + CALL_FN_W_W(ret, fn, bar); + + if (ret != 0) { + DO_PthAPIerror( "pthread_barrier_destroy", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " pthread_barrier_destroy -> %d >>\n", ret); + } + + return ret; +} + +/*----------------------------------------------------------------*/ +/*--- pthread_rwlock_t functions ---*/ +/*----------------------------------------------------------------*/ + +/* Handled: pthread_rwlock_init pthread_rwlock_destroy + pthread_rwlock_rdlock + pthread_rwlock_wrlock + pthread_rwlock_unlock + + Unhandled: pthread_rwlock_timedrdlock + pthread_rwlock_tryrdlock + + pthread_rwlock_timedwrlock + pthread_rwlock_trywrlock +*/ + +// pthread_rwlock_init +PTH_FUNC(int, pthreadZurwlockZuinit, // pthread_rwlock_init + pthread_rwlock_t *rwl, + pthread_rwlockattr_t* attr) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_rwl_init %p", rwl); fflush(stderr); + } + + CALL_FN_W_WW(ret, fn, rwl,attr); + + if (ret == 0 /*success*/) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_RWLOCK_INIT_POST, + pthread_rwlock_t*,rwl); + } else { + DO_PthAPIerror( "pthread_rwlock_init", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: rwl_init -> %d >>\n", ret); + } + return ret; +} + + +// pthread_rwlock_destroy +PTH_FUNC(int, pthreadZurwlockZudestroy, // pthread_rwlock_destroy + pthread_rwlock_t *rwl) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_rwl_destroy %p", rwl); fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_RWLOCK_DESTROY_PRE, + pthread_rwlock_t*,rwl); + + CALL_FN_W_W(ret, fn, rwl); + + if (ret != 0) { + DO_PthAPIerror( "pthread_rwlock_destroy", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: rwl_destroy -> %d >>\n", ret); + } + return ret; +} + + +// pthread_rwlock_wrlock +PTH_FUNC(int, pthreadZurwlockZuwrlock, // pthread_rwlock_wrlock + pthread_rwlock_t* rwlock) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_rwl_wlk %p", rwlock); fflush(stderr); + } + + DO_CREQ_v_WWW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE, + pthread_rwlock_t*,rwlock, + long,1/*isW*/, long,0/*!isTryLock*/); + + CALL_FN_W_W(ret, fn, rwlock); + + if (ret == 0 /*success*/) { + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST, + pthread_rwlock_t*,rwlock, long,1/*isW*/); + } else { + DO_PthAPIerror( "pthread_rwlock_wrlock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: rwl_wlk -> %d >>\n", ret); + } + return ret; +} + + +// pthread_rwlock_rdlock +PTH_FUNC(int, pthreadZurwlockZurdlock, // pthread_rwlock_rdlock + pthread_rwlock_t* rwlock) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_rwl_rlk %p", rwlock); fflush(stderr); + } + + DO_CREQ_v_WWW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE, + pthread_rwlock_t*,rwlock, + long,0/*!isW*/, long,0/*!isTryLock*/); + + CALL_FN_W_W(ret, fn, rwlock); + + if (ret == 0 /*success*/) { + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST, + pthread_rwlock_t*,rwlock, long,0/*!isW*/); + } else { + DO_PthAPIerror( "pthread_rwlock_rdlock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: rwl_rlk -> %d >>\n", ret); + } + return ret; +} + + +// pthread_rwlock_trywrlock +PTH_FUNC(int, pthreadZurwlockZutrywrlock, // pthread_rwlock_trywrlock + pthread_rwlock_t* rwlock) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_rwl_trywlk %p", rwlock); fflush(stderr); + } + + DO_CREQ_v_WWW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE, + pthread_rwlock_t*,rwlock, + long,1/*isW*/, long,1/*isTryLock*/); + + CALL_FN_W_W(ret, fn, rwlock); + + /* There's a hole here: libpthread now knows the lock is locked, + but the tool doesn't, so some other thread could run and detect + that the lock has been acquired by someone (this thread). Does + this matter? Not sure, but I don't think so. */ + + if (ret == 0 /*success*/) { + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST, + pthread_rwlock_t*,rwlock, long,1/*isW*/); + } else { + if (ret != EBUSY) + DO_PthAPIerror( "pthread_rwlock_trywrlock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: rwl_trywlk -> %d >>\n", ret); + } + return ret; +} + + +// pthread_rwlock_tryrdlock +PTH_FUNC(int, pthreadZurwlockZutryrdlock, // pthread_rwlock_tryrdlock + pthread_rwlock_t* rwlock) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_rwl_tryrlk %p", rwlock); fflush(stderr); + } + + DO_CREQ_v_WWW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE, + pthread_rwlock_t*,rwlock, + long,0/*!isW*/, long,1/*isTryLock*/); + + CALL_FN_W_W(ret, fn, rwlock); + + /* There's a hole here: libpthread now knows the lock is locked, + but the tool doesn't, so some other thread could run and detect + that the lock has been acquired by someone (this thread). Does + this matter? Not sure, but I don't think so. */ + + if (ret == 0 /*success*/) { + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST, + pthread_rwlock_t*,rwlock, long,0/*!isW*/); + } else { + if (ret != EBUSY) + DO_PthAPIerror( "pthread_rwlock_tryrdlock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: rwl_tryrlk -> %d >>\n", ret); + } + return ret; +} + + +// pthread_rwlock_unlock +PTH_FUNC(int, pthreadZurwlockZuunlock, // pthread_rwlock_unlock + pthread_rwlock_t* rwlock) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_rwl_unlk %p", rwlock); fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_PRE, + pthread_rwlock_t*,rwlock); + + CALL_FN_W_W(ret, fn, rwlock); + + if (ret == 0 /*success*/) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_POST, + pthread_rwlock_t*,rwlock); + } else { + DO_PthAPIerror( "pthread_rwlock_unlock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: rwl_unlk -> %d >>\n", ret); + } + return ret; +} + + +/*----------------------------------------------------------------*/ +/*--- POSIX semaphores ---*/ +/*----------------------------------------------------------------*/ + +#include <semaphore.h> + +#define TRACE_SEM_FNS 0 + +/* Handled: + int sem_init(sem_t *sem, int pshared, unsigned value); + int sem_destroy(sem_t *sem); + int sem_wait(sem_t *sem); + int sem_post(sem_t *sem); + + Unhandled: + int sem_trywait(sem_t *sem); + int sem_timedwait(sem_t *restrict sem, + const struct timespec *restrict abs_timeout); +*/ + +/* glibc-2.5 has sem_init@@GLIBC_2.2.5 (amd64-linux) + and sem_init@@GLIBC_2.1 (x86-linux): match sem_init@* */ +PTH_FUNC(int, semZuinitZAZa, sem_t* sem, int pshared, unsigned long value) +{ + OrigFn fn; + int ret; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_SEM_FNS) { + fprintf(stderr, "<< sem_init(%p,%d,%lu) ", sem,pshared,value); + fflush(stderr); + } + + CALL_FN_W_WWW(ret, fn, sem,pshared,value); + + if (ret == 0) { + DO_CREQ_v_WW(_VG_USERREQ__HG_POSIX_SEM_INIT_POST, + sem_t*, sem, unsigned long, value); + } else { + DO_PthAPIerror( "sem_init", errno ); + } + + if (TRACE_SEM_FNS) { + fprintf(stderr, " sem_init -> %d >>\n", ret); + fflush(stderr); + } + + return ret; +} + + +/* glibc-2.5 has sem_destroy@@GLIBC_2.2.5 (amd64-linux) + and sem_destroy@@GLIBC_2.1 (x86-linux); match sem_destroy@* */ +PTH_FUNC(int, semZudestroyZAZa, sem_t* sem) +{ + OrigFn fn; + int ret; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_SEM_FNS) { + fprintf(stderr, "<< sem_destroy(%p) ", sem); + fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_POSIX_SEM_DESTROY_PRE, sem_t*, sem); + + CALL_FN_W_W(ret, fn, sem); + + if (ret != 0) { + DO_PthAPIerror( "sem_destroy", errno ); + } + + if (TRACE_SEM_FNS) { + fprintf(stderr, " sem_destroy -> %d >>\n", ret); + fflush(stderr); + } + + return ret; +} + + +/* glibc-2.5 has sem_wait (amd64-linux); match sem_wait + and sem_wait@@GLIBC_2.1 (x86-linux); match sem_wait@* */ +/* wait: decrement semaphore - acquire lockage */ +static int sem_wait_WRK(sem_t* sem) +{ + OrigFn fn; + int ret; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_SEM_FNS) { + fprintf(stderr, "<< sem_wait(%p) ", sem); + fflush(stderr); + } + + CALL_FN_W_W(ret, fn, sem); + + if (ret == 0) { + DO_CREQ_v_W(_VG_USERREQ__HG_POSIX_SEM_WAIT_POST, sem_t*,sem); + } else { + DO_PthAPIerror( "sem_wait", errno ); + } + + if (TRACE_SEM_FNS) { + fprintf(stderr, " sem_wait -> %d >>\n", ret); + fflush(stderr); + } + + return ret; +} +PTH_FUNC(int, semZuwait, sem_t* sem) { /* sem_wait */ + return sem_wait_WRK(sem); +} +PTH_FUNC(int, semZuwaitZAZa, sem_t* sem) { /* sem_wait@* */ + return sem_wait_WRK(sem); +} + + +/* glibc-2.5 has sem_post (amd64-linux); match sem_post + and sem_post@@GLIBC_2.1 (x86-linux); match sem_post@* */ +/* post: increment semaphore - release lockage */ +static int sem_post_WRK(sem_t* sem) +{ + OrigFn fn; + int ret; + + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_SEM_FNS) { + fprintf(stderr, "<< sem_post(%p) ", sem); + fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_POSIX_SEM_POST_PRE, sem_t*,sem); + + CALL_FN_W_W(ret, fn, sem); + + if (ret != 0) { + DO_PthAPIerror( "sem_post", errno ); + } + + if (TRACE_SEM_FNS) { + fprintf(stderr, " sem_post -> %d >>\n", ret); + fflush(stderr); + } + + return ret; +} +PTH_FUNC(int, semZupost, sem_t* sem) { /* sem_post */ + return sem_post_WRK(sem); +} +PTH_FUNC(int, semZupostZAZa, sem_t* sem) { /* sem_post@* */ + return sem_post_WRK(sem); +} + + + +/*----------------------------------------------------------------*/ +/*--- Qt 4 threading functions (w/ GNU name mangling) ---*/ +/*----------------------------------------------------------------*/ + +/* Handled: + QMutex::lock() + QMutex::unlock() + QMutex::tryLock() + QMutex::tryLock(int) + + QMutex::QMutex(QMutex::RecursionMode) _ZN6QMutexC1ENS_13RecursionModeE + QMutex::QMutex(QMutex::RecursionMode) _ZN6QMutexC2ENS_13RecursionModeE + QMutex::~QMutex() _ZN6QMutexD1Ev + QMutex::~QMutex() _ZN6QMutexD2Ev + + Unhandled: + QReadWriteLock::lockForRead() + QReadWriteLock::lockForWrite() + QReadWriteLock::unlock() + QReadWriteLock::tryLockForRead(int) + QReadWriteLock::tryLockForRead() + QReadWriteLock::tryLockForWrite(int) + QReadWriteLock::tryLockForWrite() + + QWaitCondition::wait(QMutex*, unsigned long) + QWaitCondition::wakeAll() + QWaitCondition::wakeOne() + + QSemaphore::* +*/ +/* More comments, 19 Nov 08, based on assessment of qt-4.5.0TP1, + at least on Unix: + + It's apparently only necessary to intercept QMutex, since that is + not implemented using pthread_mutex_t; instead Qt4 has its own + implementation based on atomics (to check the non-contended case) + and pthread_cond_wait (to wait in the contended case). + + QReadWriteLock is built on top of QMutex, counters, and a wait + queue. So we don't need to handle it specially once QMutex + handling is correct -- presumably the dependencies through QMutex + are sufficient to avoid any false race reports. On the other hand, + it is an open question whether too many dependencies are observed + -- in which case we may miss races (false negatives). I suspect + this is likely to be the case, unfortunately. + + QWaitCondition is built on pthread_cond_t, pthread_mutex_t, QMutex + and QReadWriteLock. Same compositional-correctness justificiation + and limitations as fro QReadWriteLock. + + Ditto QSemaphore (from cursory examination). + + Does it matter that only QMutex is handled directly? Open + question. From testing with drd/tests/qt4_* and with KDE4 apps, it + appears that no false errors are reported; however it is not clear + if this is causing false negatives. + + Another problem with Qt4 is thread exiting. Threads are created + with pthread_create (fine); but they detach and simply exit when + done. There is no use of pthread_join, and the provided + wait-for-a-thread-to-exit mechanism (QThread::wait, I believe) + relies on a system of mutexes and flags. I suspect this also + causes too many dependencies to appear. Consequently H sometimes + fails to detect races at exit in some very short-lived racy + programs, because it appears that a thread can exit _and_ have an + observed dependency edge back to the main thread (presumably) + before the main thread reaps the child (that is, calls + QThread::wait). + + This theory is supported by the observation that if all threads are + made to wait at a pthread_barrier_t immediately before they exit, + then H's detection of races in such programs becomes reliable; + without the barrier, it is varies from run to run, depending + (according to investigation) on whether aforementioned + exit-before-reaping behaviour happens or not. + + Finally, why is it necessary to intercept the QMutex constructors + and destructors? The constructors are intercepted only as a matter + of convenience, so H can print accurate "first observed at" + clauses. However, it is actually necessary to intercept the + destructors (as it is with pthread_mutex_destroy) in order that + locks get removed from LAOG when they are destroyed. +*/ + +// soname is libQtCore.so.4 ; match against libQtCore.so* +#define QT4_FUNC(ret_ty, f, args...) \ + ret_ty I_WRAP_SONAME_FNNAME_ZU(libQtCoreZdsoZa,f)(args); \ + ret_ty I_WRAP_SONAME_FNNAME_ZU(libQtCoreZdsoZa,f)(args) + +// QMutex::lock() +QT4_FUNC(void, _ZN6QMutex4lockEv, void* self) +{ + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_QT4_FNS) { + fprintf(stderr, "<< QMutex::lock %p", self); fflush(stderr); + } + + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, + void*,self, long,0/*!isTryLock*/); + + CALL_FN_v_W(fn, self); + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + void*, self); + + if (TRACE_QT4_FNS) { + fprintf(stderr, " :: Q::lock done >>\n"); + } +} + +// QMutex::unlock() +QT4_FUNC(void, _ZN6QMutex6unlockEv, void* self) +{ + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_QT4_FNS) { + fprintf(stderr, "<< QMutex::unlock %p", self); fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_PRE, + void*, self); + + CALL_FN_v_W(fn, self); + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_POST, + void*, self); + + if (TRACE_QT4_FNS) { + fprintf(stderr, " Q::unlock done >>\n"); + } +} + +// bool QMutex::tryLock() +// using 'long' to mimic C++ 'bool' +QT4_FUNC(long, _ZN6QMutex7tryLockEv, void* self) +{ + OrigFn fn; + long ret; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_QT4_FNS) { + fprintf(stderr, "<< QMutex::tryLock %p", self); fflush(stderr); + } + + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, + void*,self, long,1/*isTryLock*/); + + CALL_FN_W_W(ret, fn, self); + + // assumes that only the low 8 bits of the 'bool' are significant + if (ret & 0xFF) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + void*, self); + } + + if (TRACE_QT4_FNS) { + fprintf(stderr, " :: Q::tryLock -> %lu >>\n", ret); + } + + return ret; +} + +// bool QMutex::tryLock(int) +// using 'long' to mimic C++ 'bool' +QT4_FUNC(long, _ZN6QMutex7tryLockEi, void* self, long arg2) +{ + OrigFn fn; + long ret; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_QT4_FNS) { + fprintf(stderr, "<< QMutex::tryLock(int) %p %d", self, (int)arg2); + fflush(stderr); + } + + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, + void*,self, long,1/*isTryLock*/); + + CALL_FN_W_WW(ret, fn, self,arg2); + + // assumes that only the low 8 bits of the 'bool' are significant + if (ret & 0xFF) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + void*, self); + } + + if (TRACE_QT4_FNS) { + fprintf(stderr, " :: Q::tryLock(int) -> %lu >>\n", ret); + } + + return ret; +} + + +// It's not really very clear what the args are here. But from +// a bit of dataflow analysis of the generated machine code of +// the original function, it appears this takes two args, and +// returns nothing. Nevertheless preserve return value just in +// case. A bit of debug printing indicates that the first arg +// is that of the mutex and the second is either zero or one, +// probably being the recursion mode, therefore. +// QMutex::QMutex(QMutex::RecursionMode) ("C1ENS" variant) +QT4_FUNC(void*, _ZN6QMutexC1ENS_13RecursionModeE, + void* mutex, + long recmode) +{ + OrigFn fn; + long ret; + VALGRIND_GET_ORIG_FN(fn); + CALL_FN_W_WW(ret, fn, mutex, recmode); + // fprintf(stderr, "QMutex constructor 1: %p <- %p %p\n", ret, arg1, arg2); + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_INIT_POST, + void*,mutex, long,1/*mbRec*/); + return (void*)ret; +} + +// QMutex::~QMutex() ("D1Ev" variant) +QT4_FUNC(void*, _ZN6QMutexD1Ev, void* mutex) +{ + OrigFn fn; + long ret; + VALGRIND_GET_ORIG_FN(fn); + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_DESTROY_PRE, + void*,mutex); + CALL_FN_W_W(ret, fn, mutex); + return (void*)ret; +} + + +// QMutex::QMutex(QMutex::RecursionMode) ("C2ENS" variant) +QT4_FUNC(void*, _ZN6QMutexC2ENS_13RecursionModeE, + void* mutex, + long recmode) +{ + assert(0); +} + +// QMutex::~QMutex() ("D2Ev" variant) +QT4_FUNC(void*, _ZN6QMutexD2Ev, void* mutex) +{ + assert(0); +} + + +// QReadWriteLock is not intercepted directly. See comments +// above. + +//// QReadWriteLock::lockForRead() +//// _ZN14QReadWriteLock11lockForReadEv == QReadWriteLock::lockForRead() +//QT4_FUNC(void, ZuZZN14QReadWriteLock11lockForReadEv, +// // _ZN14QReadWriteLock11lockForReadEv +// void* self) +//{ +// OrigFn fn; +// VALGRIND_GET_ORIG_FN(fn); +// if (TRACE_QT4_FNS) { +// fprintf(stderr, "<< QReadWriteLock::lockForRead %p", self); +// fflush(stderr); +// } +// +// DO_CREQ_v_WWW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE, +// void*,self, +// long,0/*!isW*/, long,0/*!isTryLock*/); +// +// CALL_FN_v_W(fn, self); +// +// DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST, +// void*,self, long,0/*!isW*/); +// +// if (TRACE_QT4_FNS) { +// fprintf(stderr, " :: Q::lockForRead :: done >>\n"); +// } +//} +// +//// QReadWriteLock::lockForWrite() +//// _ZN14QReadWriteLock12lockForWriteEv == QReadWriteLock::lockForWrite() +//QT4_FUNC(void, ZuZZN14QReadWriteLock12lockForWriteEv, +// // _ZN14QReadWriteLock12lockForWriteEv +// void* self) +//{ +// OrigFn fn; +// VALGRIND_GET_ORIG_FN(fn); +// if (TRACE_QT4_FNS) { +// fprintf(stderr, "<< QReadWriteLock::lockForWrite %p", self); +// fflush(stderr); +// } +// +// DO_CREQ_v_WWW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE, +// void*,self, +// long,1/*isW*/, long,0/*!isTryLock*/); +// +// CALL_FN_v_W(fn, self); +// +// DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST, +// void*,self, long,1/*isW*/); +// +// if (TRACE_QT4_FNS) { +// fprintf(stderr, " :: Q::lockForWrite :: done >>\n"); +// } +//} +// +//// QReadWriteLock::unlock() +//// _ZN14QReadWriteLock6unlockEv == QReadWriteLock::unlock() +//QT4_FUNC(void, ZuZZN14QReadWriteLock6unlockEv, +// // _ZN14QReadWriteLock6unlockEv +// void* self) +//{ +// OrigFn fn; +// VALGRIND_GET_ORIG_FN(fn); +// if (TRACE_QT4_FNS) { +// fprintf(stderr, "<< QReadWriteLock::unlock %p", self); +// fflush(stderr); +// } +// +// DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_PRE, +// void*,self); +// +// CALL_FN_v_W(fn, self); +// +// DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_POST, +// void*,self); +// +// if (TRACE_QT4_FNS) { +// fprintf(stderr, " :: Q::unlock :: done >>\n"); +// } +//} + + +/*----------------------------------------------------------------*/ +/*--- Replacements for basic string functions, that don't ---*/ +/*--- overrun the input arrays. ---*/ +/*----------------------------------------------------------------*/ + +/* Copied verbatim from memcheck/mc_replace_strmem.c. When copying + new functions, please keep them in the same order as they appear in + mc_replace_strmem.c. */ + + +#define STRCHR(soname, fnname) \ + char* VG_REPLACE_FUNCTION_ZU(soname,fnname) ( const char* s, int c ); \ + char* VG_REPLACE_FUNCTION_ZU(soname,fnname) ( const char* s, int c ) \ + { \ + UChar ch = (UChar)((UInt)c); \ + UChar* p = (UChar*)s; \ + while (True) { \ + if (*p == ch) return p; \ + if (*p == 0) return NULL; \ + p++; \ + } \ + } + +// Apparently index() is the same thing as strchr() +STRCHR(VG_Z_LIBC_SONAME, strchr) +STRCHR(VG_Z_LD_LINUX_SO_2, strchr) +STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, strchr) +STRCHR(VG_Z_LIBC_SONAME, index) +STRCHR(VG_Z_LD_LINUX_SO_2, index) +STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, index) + + +// Note that this replacement often doesn't get used because gcc inlines +// calls to strlen() with its own built-in version. This can be very +// confusing if you aren't expecting it. Other small functions in this file +// may also be inline by gcc. +#define STRLEN(soname, fnname) \ + SizeT VG_REPLACE_FUNCTION_ZU(soname,fnname)( const char* str ); \ + SizeT VG_REPLACE_FUNCTION_ZU(soname,fnname)( const char* str ) \ + { \ + SizeT i = 0; \ + while (str[i] != 0) i++; \ + return i; \ + } + +STRLEN(VG_Z_LIBC_SONAME, strlen) +STRLEN(VG_Z_LD_LINUX_SO_2, strlen) +STRLEN(VG_Z_LD_LINUX_X86_64_SO_2, strlen) + + +#define STRCPY(soname, fnname) \ + char* VG_REPLACE_FUNCTION_ZU(soname, fnname) ( char* dst, const char* src ); \ + char* VG_REPLACE_FUNCTION_ZU(soname, fnname) ( char* dst, const char* src ) \ + { \ + const Char* dst_orig = dst; \ + \ + while (*src) *dst++ = *src++; \ + *dst = 0; \ + \ + return (char*)dst_orig; \ + } + +STRCPY(VG_Z_LIBC_SONAME, strcpy) + + +#define STRCMP(soname, fnname) \ + int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ + ( const char* s1, const char* s2 ); \ + int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ + ( const char* s1, const char* s2 ) \ + { \ + register unsigned char c1; \ + register unsigned char c2; \ + while (True) { \ + c1 = *(unsigned char *)s1; \ + c2 = *(unsigned char *)s2; \ + if (c1 != c2) break; \ + if (c1 == 0) break; \ + s1++; s2++; \ + } \ + if ((unsigned char)c1 < (unsigned char)c2) return -1; \ + if ((unsigned char)c1 > (unsigned char)c2) return 1; \ + return 0; \ + } + +STRCMP(VG_Z_LIBC_SONAME, strcmp) +STRCMP(VG_Z_LD_LINUX_X86_64_SO_2, strcmp) +STRCMP(VG_Z_LD64_SO_1, strcmp) + + +#define MEMCPY(soname, fnname) \ + void* VG_REPLACE_FUNCTION_ZU(soname,fnname) \ + ( void *dst, const void *src, SizeT len ); \ + void* VG_REPLACE_FUNCTION_ZU(soname,fnname) \ + ( void *dst, const void *src, SizeT len ) \ + { \ + register char *d; \ + register char *s; \ + \ + if (len == 0) \ + return dst; \ + \ + if ( dst > src ) { \ + d = (char *)dst + len - 1; \ + s = (char *)src + len - 1; \ + while ( len >= 4 ) { \ + *d-- = *s--; \ + *d-- = *s--; \ + *d-- = *s--; \ + *d-- = *s--; \ + len -= 4; \ + } \ + while ( len-- ) { \ + *d-- = *s--; \ + } \ + } else if ( dst < src ) { \ + d = (char *)dst; \ + s = (char *)src; \ + while ( len >= 4 ) { \ + *d++ = *s++; \ + *d++ = *s++; \ + *d++ = *s++; \ + *d++ = *s++; \ + len -= 4; \ + } \ + while ( len-- ) { \ + *d++ = *s++; \ + } \ + } \ + return dst; \ + } + +MEMCPY(VG_Z_LIBC_SONAME, memcpy) +MEMCPY(VG_Z_LD_SO_1, memcpy) /* ld.so.1 */ +MEMCPY(VG_Z_LD64_SO_1, memcpy) /* ld64.so.1 */ +/* icc9 blats these around all over the place. Not only in the main + executable but various .so's. They are highly tuned and read + memory beyond the source boundary (although work correctly and + never go across page boundaries), so give errors when run natively, + at least for misaligned source arg. Just intercepting in the exe + only until we understand more about the problem. See + http://bugs.kde.org/show_bug.cgi?id=139776 + */ +MEMCPY(NONE, _intel_fast_memcpy) + + +/*--------------------------------------------------------------------*/ +/*--- end tc_intercepts.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/.svn/text-base/hg_lock_n_thread.c.svn-base b/helgrind/.svn/text-base/hg_lock_n_thread.c.svn-base new file mode 100644 index 0000000..bcdb236 --- /dev/null +++ b/helgrind/.svn/text-base/hg_lock_n_thread.c.svn-base @@ -0,0 +1,123 @@ + +/*--------------------------------------------------------------------*/ +/*--- Definitions for Locks and Threads. ---*/ +/*--- hg_lock_n_thread.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_libcbase.h" +#include "pub_tool_libcassert.h" +#include "pub_tool_execontext.h" +#include "pub_tool_threadstate.h" +#include "pub_tool_wordfm.h" + +#include "hg_basics.h" +#include "hg_wordset.h" +#include "hg_lock_n_thread.h" /* self */ + + +/*----------------------------------------------------------------*/ +/*--- Sanity checking ---*/ +/*----------------------------------------------------------------*/ + +inline Bool HG_(is_sane_Thread) ( Thread* thr ) { + return thr != NULL && thr->magic == Thread_MAGIC; +} + +static Bool is_sane_Bag_of_Threads ( WordBag* bag ) +{ + Thread* thr; + Word count; + VG_(initIterBag)( bag ); + while (VG_(nextIterBag)( bag, (Word*)&thr, &count )) { + if (count < 1) return False; + if (!HG_(is_sane_Thread)(thr)) return False; + } + VG_(doneIterBag)( bag ); + return True; +} + +static Bool is_sane_Lock_BASE ( Lock* lock ) +{ + if (lock == NULL + || (lock->magic != LockN_MAGIC && lock->magic != LockP_MAGIC)) + return False; + switch (lock->kind) { + case LK_mbRec: case LK_nonRec: case LK_rdwr: break; + default: return False; + } + if (lock->heldBy == NULL) { + if (lock->acquired_at != NULL) return False; + /* Unheld. We arbitrarily require heldW to be False. */ + return !lock->heldW; + } else { + if (lock->acquired_at == NULL) return False; + } + + /* If heldBy is non-NULL, we require it to contain at least one + thread. */ + if (VG_(isEmptyBag)(lock->heldBy)) + return False; + + /* Lock is either r- or w-held. */ + if (!is_sane_Bag_of_Threads(lock->heldBy)) + return False; + if (lock->heldW) { + /* Held in write-mode */ + if ((lock->kind == LK_nonRec || lock->kind == LK_rdwr) + && !VG_(isSingletonTotalBag)(lock->heldBy)) + return False; + } else { + /* Held in read-mode */ + if (lock->kind != LK_rdwr) return False; + } + return True; +} + +Bool HG_(is_sane_LockP) ( Lock* lock ) { + return lock != NULL + && lock->magic == LockP_MAGIC + && lock->hbso == NULL + && is_sane_Lock_BASE(lock); +} + +Bool HG_(is_sane_LockN) ( Lock* lock ) { + return lock != NULL + && lock->magic == LockN_MAGIC + && lock->hbso != NULL + && is_sane_Lock_BASE(lock); +} + +Bool HG_(is_sane_LockNorP) ( Lock* lock ) { + return is_sane_Lock_BASE(lock); +} + + +/*--------------------------------------------------------------------*/ +/*--- end hg_lock_n_thread.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/.svn/text-base/hg_lock_n_thread.h.svn-base b/helgrind/.svn/text-base/hg_lock_n_thread.h.svn-base new file mode 100644 index 0000000..01ae3aa --- /dev/null +++ b/helgrind/.svn/text-base/hg_lock_n_thread.h.svn-base @@ -0,0 +1,165 @@ + +/*--------------------------------------------------------------------*/ +/*--- Definitions for Locks and Threads. ---*/ +/*--- hg_lock_n_thread.h ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#ifndef __HG_LOCK_N_THREAD_H +#define __HG_LOCK_N_THREAD_H + + +/*----------------------------------------------------------------*/ +/*--- Primary data definitions ---*/ +/*----------------------------------------------------------------*/ + +/* Magic numbers, for doing assertions that structures really are of + the right type. Useful as some of the code can get a bit + complex. */ +#define Thread_MAGIC 0x504fc5e5 +#define LockN_MAGIC 0x6545b557 /* normal nonpersistent locks */ +#define LockP_MAGIC 0x755b5456 /* persistent (copied) locks */ + + +/* These are handles for Word sets. CONSTRAINTS: must be (very) small + ints numbered from zero, since < 30-bit versions of them are used to + encode thread-sets and lock-sets in 32-bit shadow words. */ +typedef WordSet WordSetID; + + +/* Synchronisation Objects, exported abstractly by libhb. */ +typedef struct _SO SO; + +/* Thr, libhb's private thread record, exported abstractly */ +typedef struct _Thr Thr; + + +/* Stores information about a thread. Addresses of these also serve + as unique thread identifiers and so are never freed, so they should + be as small as possible. Freeing Thread structures makes the + storage management just too complex, and most programs don't create + many threads, so tolerating this leak seems like a not-bad + tradeoff. + + Since these are never freed, the .coretid field only indicates the + core's ThreadId associated with this Thread whilst it is alive. + Once the thread finishes, the ThreadId is set to + VG_INVALID_THREADID. + + The core may later re-use the same ThreadId for what is a logically + completely different thread, which of course must have a different + Thread structure. */ +typedef + struct _Thread { + /* ADMIN */ + struct _Thread* admin; + UInt magic; + Thr* hbthr; + ThreadId coretid; + /* USEFUL */ + WordSetID locksetA; /* WordSet of Lock* currently held by thread */ + WordSetID locksetW; /* subset of locksetA held in w-mode */ + /* EXPOSITION */ + /* Place where parent was when this thread was created. */ + ExeContext* created_at; + Bool announced; + /* Index for generating references in error messages. */ + Int errmsg_index; + } + Thread; + + +/* Stores information about a lock's current state. These are + allocated and later freed (when the containing memory becomes + NoAccess). This gives a problem for the XError type, which + contains Lock*s. Solution is to copy any Lock which is to be + incorporated into an XErrors, so as to make it independent from the + 'normal' collection of Locks, which can come and go. When the lock + is copied, its .magic is changed from LockN_Magic to + LockP_Magic. */ + +/* Lock kinds. */ +typedef + enum { + LK_mbRec=1001, /* normal mutex, possibly recursive */ + LK_nonRec, /* normal mutex, definitely non recursive */ + LK_rdwr /* reader-writer lock */ + } + LockKind; + +typedef + struct _Lock { + /* ADMIN */ + struct _Lock* admin; + ULong unique; /* used for persistence-hashing */ + UInt magic; /* LockN_MAGIC or LockP_MAGIC */ + /* EXPOSITION */ + /* Place where lock first came to the attention of Helgrind. */ + ExeContext* appeared_at; + /* If the lock is held, place where the lock most recently made + an unlocked->locked transition. Must be sync'd with .heldBy: + either both NULL or both non-NULL. */ + ExeContext* acquired_at; + /* USEFUL-STATIC */ + SO* hbso; /* associated SO */ + Addr guestaddr; /* Guest address of lock */ + LockKind kind; /* what kind of lock this is */ + /* USEFUL-DYNAMIC */ + Bool heldW; + WordBag* heldBy; /* bag of threads that hold this lock */ + /* .heldBy is NULL: lock is unheld, and .heldW is meaningless + but arbitrarily set to False + .heldBy is non-NULL: + .heldW is True: lock is w-held by threads in heldBy + .heldW is False: lock is r-held by threads in heldBy + Either way, heldBy may not validly be an empty Bag. + + for LK_nonRec, r-holdings are not allowed, and w-holdings may + only have sizeTotal(heldBy) == 1 + + for LK_mbRec, r-holdings are not allowed, and w-holdings may + only have sizeUnique(heldBy) == 1 + + for LK_rdwr, w-holdings may only have sizeTotal(heldBy) == 1 */ + } + Lock; + +/*----------------------------------------------------------------*/ +/*--- Sanity checking ---*/ +/*----------------------------------------------------------------*/ + +Bool HG_(is_sane_Thread) ( Thread* thr ); +Bool HG_(is_sane_LockP) ( Lock* lock ); +Bool HG_(is_sane_LockN) ( Lock* lock ); +Bool HG_(is_sane_LockNorP) ( Lock* lock ); + + +#endif /* ! __HG_LOCK_N_THREAD_H */ + +/*--------------------------------------------------------------------*/ +/*--- end hg_lock_n_thread.h ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/.svn/text-base/hg_main.c.svn-base b/helgrind/.svn/text-base/hg_main.c.svn-base new file mode 100644 index 0000000..d63d73b --- /dev/null +++ b/helgrind/.svn/text-base/hg_main.c.svn-base @@ -0,0 +1,4287 @@ + +/*--------------------------------------------------------------------*/ +/*--- Helgrind: a Valgrind tool for detecting errors ---*/ +/*--- in threaded programs. hg_main.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks LLP + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. + + Neither the names of the U.S. Department of Energy nor the + University of California nor the names of its contributors may be + used to endorse or promote products derived from this software + without prior written permission. +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_libcassert.h" +#include "pub_tool_libcbase.h" +#include "pub_tool_libcprint.h" +#include "pub_tool_threadstate.h" +#include "pub_tool_tooliface.h" +#include "pub_tool_hashtable.h" +#include "pub_tool_replacemalloc.h" +#include "pub_tool_machine.h" +#include "pub_tool_options.h" +#include "pub_tool_xarray.h" +#include "pub_tool_stacktrace.h" +#include "pub_tool_debuginfo.h" /* VG_(get_data_description) */ +#include "pub_tool_wordfm.h" + +#include "hg_basics.h" +#include "hg_wordset.h" +#include "hg_lock_n_thread.h" +#include "hg_errors.h" + +#include "libhb.h" + +#include "helgrind.h" + + +// FIXME: new_mem_w_tid ignores the supplied tid. (wtf?!) + +// FIXME: when client destroys a lock or a CV, remove these +// from our mappings, so that the associated SO can be freed up + +/*----------------------------------------------------------------*/ +/*--- ---*/ +/*----------------------------------------------------------------*/ + +/* Note this needs to be compiled with -fno-strict-aliasing, since it + contains a whole bunch of calls to lookupFM etc which cast between + Word and pointer types. gcc rightly complains this breaks ANSI C + strict aliasing rules, at -O2. No complaints at -O, but -O2 gives + worthwhile performance benefits over -O. +*/ + +// FIXME catch sync signals (SEGV, basically) and unlock BHL, +// if held. Otherwise a LOCK-prefixed insn which segfaults +// gets Helgrind into a total muddle as the BHL will not be +// released after the insn. + +// FIXME what is supposed to happen to locks in memory which +// is relocated as a result of client realloc? + +// FIXME put referencing ThreadId into Thread and get +// rid of the slow reverse mapping function. + +// FIXME accesses to NoAccess areas: change state to Excl? + +// FIXME report errors for accesses of NoAccess memory? + +// FIXME pth_cond_wait/timedwait wrappers. Even if these fail, +// the thread still holds the lock. + +/* ------------ Debug/trace options ------------ */ + +// this is: +// shadow_mem_make_NoAccess: 29156 SMs, 1728 scanned +// happens_before_wrk: 1000 +// ev__post_thread_join: 3360 SMs, 29 scanned, 252 re-Excls +#define SHOW_EXPENSIVE_STUFF 0 + +// 0 for silent, 1 for some stuff, 2 for lots of stuff +#define SHOW_EVENTS 0 + + +static void all__sanity_check ( Char* who ); /* fwds */ + +#define HG_CLI__MALLOC_REDZONE_SZB 16 /* let's say */ + +// 0 for none, 1 for dump at end of run +#define SHOW_DATA_STRUCTURES 0 + + +/* ------------ Misc comments ------------ */ + +// FIXME: don't hardwire initial entries for root thread. +// Instead, let the pre_thread_ll_create handler do this. + + +/*----------------------------------------------------------------*/ +/*--- Primary data structures ---*/ +/*----------------------------------------------------------------*/ + +/* Admin linked list of Threads */ +static Thread* admin_threads = NULL; + +/* Admin linked list of Locks */ +static Lock* admin_locks = NULL; + +/* Mapping table for core ThreadIds to Thread* */ +static Thread** map_threads = NULL; /* Array[VG_N_THREADS] of Thread* */ + +/* Mapping table for lock guest addresses to Lock* */ +static WordFM* map_locks = NULL; /* WordFM LockAddr Lock* */ + +/* The word-set universes for thread sets and lock sets. */ +static WordSetU* univ_tsets = NULL; /* sets of Thread* */ +static WordSetU* univ_lsets = NULL; /* sets of Lock* */ +static WordSetU* univ_laog = NULL; /* sets of Lock*, for LAOG */ + +/* never changed; we only care about its address. Is treated as if it + was a standard userspace lock. Also we have a Lock* describing it + so it can participate in lock sets in the usual way. */ +static Int __bus_lock = 0; +static Lock* __bus_lock_Lock = NULL; + + +/*----------------------------------------------------------------*/ +/*--- Simple helpers for the data structures ---*/ +/*----------------------------------------------------------------*/ + +static UWord stats__lockN_acquires = 0; +static UWord stats__lockN_releases = 0; + +static +ThreadId map_threads_maybe_reverse_lookup_SLOW ( Thread* thr ); /*fwds*/ + +/* --------- Constructors --------- */ + +static Thread* mk_Thread ( Thr* hbthr ) { + static Int indx = 1; + Thread* thread = HG_(zalloc)( "hg.mk_Thread.1", sizeof(Thread) ); + thread->locksetA = HG_(emptyWS)( univ_lsets ); + thread->locksetW = HG_(emptyWS)( univ_lsets ); + thread->magic = Thread_MAGIC; + thread->hbthr = hbthr; + thread->coretid = VG_INVALID_THREADID; + thread->created_at = NULL; + thread->announced = False; + thread->errmsg_index = indx++; + thread->admin = admin_threads; + admin_threads = thread; + return thread; +} + +// Make a new lock which is unlocked (hence ownerless) +static Lock* mk_LockN ( LockKind kind, Addr guestaddr ) { + static ULong unique = 0; + Lock* lock = HG_(zalloc)( "hg.mk_Lock.1", sizeof(Lock) ); + lock->admin = admin_locks; + lock->unique = unique++; + lock->magic = LockN_MAGIC; + lock->appeared_at = NULL; + lock->acquired_at = NULL; + lock->hbso = libhb_so_alloc(); + lock->guestaddr = guestaddr; + lock->kind = kind; + lock->heldW = False; + lock->heldBy = NULL; + tl_assert(HG_(is_sane_LockN)(lock)); + admin_locks = lock; + return lock; +} + +/* Release storage for a Lock. Also release storage in .heldBy, if + any. */ +static void del_LockN ( Lock* lk ) +{ + tl_assert(HG_(is_sane_LockN)(lk)); + tl_assert(lk->hbso); + libhb_so_dealloc(lk->hbso); + if (lk->heldBy) + VG_(deleteBag)( lk->heldBy ); + VG_(memset)(lk, 0xAA, sizeof(*lk)); + HG_(free)(lk); +} + +/* Update 'lk' to reflect that 'thr' now has a write-acquisition of + it. This is done strictly: only combinations resulting from + correct program and libpthread behaviour are allowed. */ +static void lockN_acquire_writer ( Lock* lk, Thread* thr ) +{ + tl_assert(HG_(is_sane_LockN)(lk)); + tl_assert(HG_(is_sane_Thread)(thr)); + + stats__lockN_acquires++; + + /* EXPOSITION only */ + /* We need to keep recording snapshots of where the lock was + acquired, so as to produce better lock-order error messages. */ + if (lk->acquired_at == NULL) { + ThreadId tid; + tl_assert(lk->heldBy == NULL); + tid = map_threads_maybe_reverse_lookup_SLOW(thr); + lk->acquired_at + = VG_(record_ExeContext)(tid, 0/*first_ip_delta*/); + } else { + tl_assert(lk->heldBy != NULL); + } + /* end EXPOSITION only */ + + switch (lk->kind) { + case LK_nonRec: + case_LK_nonRec: + tl_assert(lk->heldBy == NULL); /* can't w-lock recursively */ + tl_assert(!lk->heldW); + lk->heldW = True; + lk->heldBy = VG_(newBag)( HG_(zalloc), "hg.lNaw.1", HG_(free) ); + VG_(addToBag)( lk->heldBy, (Word)thr ); + break; + case LK_mbRec: + if (lk->heldBy == NULL) + goto case_LK_nonRec; + /* 2nd and subsequent locking of a lock by its owner */ + tl_assert(lk->heldW); + /* assert: lk is only held by one thread .. */ + tl_assert(VG_(sizeUniqueBag(lk->heldBy)) == 1); + /* assert: .. and that thread is 'thr'. */ + tl_assert(VG_(elemBag)(lk->heldBy, (Word)thr) + == VG_(sizeTotalBag)(lk->heldBy)); + VG_(addToBag)(lk->heldBy, (Word)thr); + break; + case LK_rdwr: + tl_assert(lk->heldBy == NULL && !lk->heldW); /* must be unheld */ + goto case_LK_nonRec; + default: + tl_assert(0); + } + tl_assert(HG_(is_sane_LockN)(lk)); +} + +static void lockN_acquire_reader ( Lock* lk, Thread* thr ) +{ + tl_assert(HG_(is_sane_LockN)(lk)); + tl_assert(HG_(is_sane_Thread)(thr)); + /* can only add reader to a reader-writer lock. */ + tl_assert(lk->kind == LK_rdwr); + /* lk must be free or already r-held. */ + tl_assert(lk->heldBy == NULL + || (lk->heldBy != NULL && !lk->heldW)); + + stats__lockN_acquires++; + + /* EXPOSITION only */ + /* We need to keep recording snapshots of where the lock was + acquired, so as to produce better lock-order error messages. */ + if (lk->acquired_at == NULL) { + ThreadId tid; + tl_assert(lk->heldBy == NULL); + tid = map_threads_maybe_reverse_lookup_SLOW(thr); + lk->acquired_at + = VG_(record_ExeContext)(tid, 0/*first_ip_delta*/); + } else { + tl_assert(lk->heldBy != NULL); + } + /* end EXPOSITION only */ + + if (lk->heldBy) { + VG_(addToBag)(lk->heldBy, (Word)thr); + } else { + lk->heldW = False; + lk->heldBy = VG_(newBag)( HG_(zalloc), "hg.lNar.1", HG_(free) ); + VG_(addToBag)( lk->heldBy, (Word)thr ); + } + tl_assert(!lk->heldW); + tl_assert(HG_(is_sane_LockN)(lk)); +} + +/* Update 'lk' to reflect a release of it by 'thr'. This is done + strictly: only combinations resulting from correct program and + libpthread behaviour are allowed. */ + +static void lockN_release ( Lock* lk, Thread* thr ) +{ + Bool b; + tl_assert(HG_(is_sane_LockN)(lk)); + tl_assert(HG_(is_sane_Thread)(thr)); + /* lock must be held by someone */ + tl_assert(lk->heldBy); + stats__lockN_releases++; + /* Remove it from the holder set */ + b = VG_(delFromBag)(lk->heldBy, (Word)thr); + /* thr must actually have been a holder of lk */ + tl_assert(b); + /* normalise */ + tl_assert(lk->acquired_at); + if (VG_(isEmptyBag)(lk->heldBy)) { + VG_(deleteBag)(lk->heldBy); + lk->heldBy = NULL; + lk->heldW = False; + lk->acquired_at = NULL; + } + tl_assert(HG_(is_sane_LockN)(lk)); +} + +static void remove_Lock_from_locksets_of_all_owning_Threads( Lock* lk ) +{ + Thread* thr; + if (!lk->heldBy) { + tl_assert(!lk->heldW); + return; + } + /* for each thread that holds this lock do ... */ + VG_(initIterBag)( lk->heldBy ); + while (VG_(nextIterBag)( lk->heldBy, (Word*)&thr, NULL )) { + tl_assert(HG_(is_sane_Thread)(thr)); + tl_assert(HG_(elemWS)( univ_lsets, + thr->locksetA, (Word)lk )); + thr->locksetA + = HG_(delFromWS)( univ_lsets, thr->locksetA, (Word)lk ); + + if (lk->heldW) { + tl_assert(HG_(elemWS)( univ_lsets, + thr->locksetW, (Word)lk )); + thr->locksetW + = HG_(delFromWS)( univ_lsets, thr->locksetW, (Word)lk ); + } + } + VG_(doneIterBag)( lk->heldBy ); +} + + +/*----------------------------------------------------------------*/ +/*--- Print out the primary data structures ---*/ +/*----------------------------------------------------------------*/ + +//static WordSetID del_BHL ( WordSetID lockset ); /* fwds */ + +#define PP_THREADS (1<<1) +#define PP_LOCKS (1<<2) +#define PP_ALL (PP_THREADS | PP_LOCKS) + + +static const Int sHOW_ADMIN = 0; + +static void space ( Int n ) +{ + Int i; + Char spaces[128+1]; + tl_assert(n >= 0 && n < 128); + if (n == 0) + return; + for (i = 0; i < n; i++) + spaces[i] = ' '; + spaces[i] = 0; + tl_assert(i < 128+1); + VG_(printf)("%s", spaces); +} + +static void pp_Thread ( Int d, Thread* t ) +{ + space(d+0); VG_(printf)("Thread %p {\n", t); + if (sHOW_ADMIN) { + space(d+3); VG_(printf)("admin %p\n", t->admin); + space(d+3); VG_(printf)("magic 0x%x\n", (UInt)t->magic); + } + space(d+3); VG_(printf)("locksetA %d\n", (Int)t->locksetA); + space(d+3); VG_(printf)("locksetW %d\n", (Int)t->locksetW); + space(d+0); VG_(printf)("}\n"); +} + +static void pp_admin_threads ( Int d ) +{ + Int i, n; + Thread* t; + for (n = 0, t = admin_threads; t; n++, t = t->admin) { + /* nothing */ + } + space(d); VG_(printf)("admin_threads (%d records) {\n", n); + for (i = 0, t = admin_threads; t; i++, t = t->admin) { + if (0) { + space(n); + VG_(printf)("admin_threads record %d of %d:\n", i, n); + } + pp_Thread(d+3, t); + } + space(d); VG_(printf)("}\n"); +} + +static void pp_map_threads ( Int d ) +{ + Int i, n = 0; + space(d); VG_(printf)("map_threads "); + for (i = 0; i < VG_N_THREADS; i++) { + if (map_threads[i] != NULL) + n++; + } + VG_(printf)("(%d entries) {\n", n); + for (i = 0; i < VG_N_THREADS; i++) { + if (map_threads[i] == NULL) + continue; + space(d+3); + VG_(printf)("coretid %d -> Thread %p\n", i, map_threads[i]); + } + space(d); VG_(printf)("}\n"); +} + +static const HChar* show_LockKind ( LockKind lkk ) { + switch (lkk) { + case LK_mbRec: return "mbRec"; + case LK_nonRec: return "nonRec"; + case LK_rdwr: return "rdwr"; + default: tl_assert(0); + } +} + +static void pp_Lock ( Int d, Lock* lk ) +{ + space(d+0); VG_(printf)("Lock %p (ga %#lx) {\n", lk, lk->guestaddr); + if (sHOW_ADMIN) { + space(d+3); VG_(printf)("admin %p\n", lk->admin); + space(d+3); VG_(printf)("magic 0x%x\n", (UInt)lk->magic); + } + space(d+3); VG_(printf)("unique %llu\n", lk->unique); + space(d+3); VG_(printf)("kind %s\n", show_LockKind(lk->kind)); + space(d+3); VG_(printf)("heldW %s\n", lk->heldW ? "yes" : "no"); + space(d+3); VG_(printf)("heldBy %p", lk->heldBy); + if (lk->heldBy) { + Thread* thr; + Word count; + VG_(printf)(" { "); + VG_(initIterBag)( lk->heldBy ); + while (VG_(nextIterBag)( lk->heldBy, (Word*)&thr, &count )) + VG_(printf)("%lu:%p ", count, thr); + VG_(doneIterBag)( lk->heldBy ); + VG_(printf)("}"); + } + VG_(printf)("\n"); + space(d+0); VG_(printf)("}\n"); +} + +static void pp_admin_locks ( Int d ) +{ + Int i, n; + Lock* lk; + for (n = 0, lk = admin_locks; lk; n++, lk = lk->admin) { + /* nothing */ + } + space(d); VG_(printf)("admin_locks (%d records) {\n", n); + for (i = 0, lk = admin_locks; lk; i++, lk = lk->admin) { + if (0) { + space(n); + VG_(printf)("admin_locks record %d of %d:\n", i, n); + } + pp_Lock(d+3, lk); + } + space(d); VG_(printf)("}\n"); +} + +static void pp_map_locks ( Int d ) +{ + void* gla; + Lock* lk; + space(d); VG_(printf)("map_locks (%d entries) {\n", + (Int)VG_(sizeFM)( map_locks )); + VG_(initIterFM)( map_locks ); + while (VG_(nextIterFM)( map_locks, (Word*)&gla, + (Word*)&lk )) { + space(d+3); + VG_(printf)("guest %p -> Lock %p\n", gla, lk); + } + VG_(doneIterFM)( map_locks ); + space(d); VG_(printf)("}\n"); +} + +static void pp_everything ( Int flags, Char* caller ) +{ + Int d = 0; + VG_(printf)("\n"); + VG_(printf)("All_Data_Structures (caller = \"%s\") {\n", caller); + if (flags & PP_THREADS) { + VG_(printf)("\n"); + pp_admin_threads(d+3); + VG_(printf)("\n"); + pp_map_threads(d+3); + } + if (flags & PP_LOCKS) { + VG_(printf)("\n"); + pp_admin_locks(d+3); + VG_(printf)("\n"); + pp_map_locks(d+3); + } + + VG_(printf)("\n"); + VG_(printf)("}\n"); + VG_(printf)("\n"); +} + +#undef SHOW_ADMIN + + +/*----------------------------------------------------------------*/ +/*--- Initialise the primary data structures ---*/ +/*----------------------------------------------------------------*/ + +static void initialise_data_structures ( Thr* hbthr_root ) +{ + Thread* thr; + + /* Get everything initialised and zeroed. */ + tl_assert(admin_threads == NULL); + tl_assert(admin_locks == NULL); + + tl_assert(sizeof(Addr) == sizeof(Word)); + + tl_assert(map_threads == NULL); + map_threads = HG_(zalloc)( "hg.ids.1", VG_N_THREADS * sizeof(Thread*) ); + tl_assert(map_threads != NULL); + + tl_assert(sizeof(Addr) == sizeof(Word)); + tl_assert(map_locks == NULL); + map_locks = VG_(newFM)( HG_(zalloc), "hg.ids.2", HG_(free), + NULL/*unboxed Word cmp*/); + tl_assert(map_locks != NULL); + + __bus_lock_Lock = mk_LockN( LK_nonRec, (Addr)&__bus_lock ); + tl_assert(HG_(is_sane_LockN)(__bus_lock_Lock)); + VG_(addToFM)( map_locks, (Word)&__bus_lock, (Word)__bus_lock_Lock ); + + tl_assert(univ_tsets == NULL); + univ_tsets = HG_(newWordSetU)( HG_(zalloc), "hg.ids.3", HG_(free), + 8/*cacheSize*/ ); + tl_assert(univ_tsets != NULL); + + tl_assert(univ_lsets == NULL); + univ_lsets = HG_(newWordSetU)( HG_(zalloc), "hg.ids.4", HG_(free), + 8/*cacheSize*/ ); + tl_assert(univ_lsets != NULL); + + tl_assert(univ_laog == NULL); + univ_laog = HG_(newWordSetU)( HG_(zalloc), "hg.ids.5 (univ_laog)", + HG_(free), 24/*cacheSize*/ ); + tl_assert(univ_laog != NULL); + + /* Set up entries for the root thread */ + // FIXME: this assumes that the first real ThreadId is 1 + + /* a Thread for the new thread ... */ + thr = mk_Thread(hbthr_root); + thr->coretid = 1; /* FIXME: hardwires an assumption about the + identity of the root thread. */ + tl_assert( libhb_get_Thr_opaque(hbthr_root) == NULL ); + libhb_set_Thr_opaque(hbthr_root, thr); + + /* and bind it in the thread-map table. */ + tl_assert(HG_(is_sane_ThreadId)(thr->coretid)); + tl_assert(thr->coretid != VG_INVALID_THREADID); + + map_threads[thr->coretid] = thr; + + tl_assert(VG_INVALID_THREADID == 0); + + /* Mark the new bus lock correctly (to stop the sanity checks + complaining) */ + tl_assert( sizeof(__bus_lock) == 4 ); + + all__sanity_check("initialise_data_structures"); +} + + +/*----------------------------------------------------------------*/ +/*--- map_threads :: array[core-ThreadId] of Thread* ---*/ +/*----------------------------------------------------------------*/ + +/* Doesn't assert if the relevant map_threads entry is NULL. */ +static Thread* map_threads_maybe_lookup ( ThreadId coretid ) +{ + Thread* thr; + tl_assert( HG_(is_sane_ThreadId)(coretid) ); + thr = map_threads[coretid]; + return thr; +} + +/* Asserts if the relevant map_threads entry is NULL. */ +static inline Thread* map_threads_lookup ( ThreadId coretid ) +{ + Thread* thr; + tl_assert( HG_(is_sane_ThreadId)(coretid) ); + thr = map_threads[coretid]; + tl_assert(thr); + return thr; +} + +/* Do a reverse lookup. Does not assert if 'thr' is not found in + map_threads. */ +static ThreadId map_threads_maybe_reverse_lookup_SLOW ( Thread* thr ) +{ + ThreadId tid; + tl_assert(HG_(is_sane_Thread)(thr)); + /* Check nobody used the invalid-threadid slot */ + tl_assert(VG_INVALID_THREADID >= 0 && VG_INVALID_THREADID < VG_N_THREADS); + tl_assert(map_threads[VG_INVALID_THREADID] == NULL); + tid = thr->coretid; + tl_assert(HG_(is_sane_ThreadId)(tid)); + return tid; +} + +/* Do a reverse lookup. Warning: POTENTIALLY SLOW. Asserts if 'thr' + is not found in map_threads. */ +static ThreadId map_threads_reverse_lookup_SLOW ( Thread* thr ) +{ + ThreadId tid = map_threads_maybe_reverse_lookup_SLOW( thr ); + tl_assert(tid != VG_INVALID_THREADID); + tl_assert(map_threads[tid]); + tl_assert(map_threads[tid]->coretid == tid); + return tid; +} + +static void map_threads_delete ( ThreadId coretid ) +{ + Thread* thr; + tl_assert(coretid != 0); + tl_assert( HG_(is_sane_ThreadId)(coretid) ); + thr = map_threads[coretid]; + tl_assert(thr); + map_threads[coretid] = NULL; +} + + +/*----------------------------------------------------------------*/ +/*--- map_locks :: WordFM guest-Addr-of-lock Lock* ---*/ +/*----------------------------------------------------------------*/ + +/* Make sure there is a lock table entry for the given (lock) guest + address. If not, create one of the stated 'kind' in unheld state. + In any case, return the address of the existing or new Lock. */ +static +Lock* map_locks_lookup_or_create ( LockKind lkk, Addr ga, ThreadId tid ) +{ + Bool found; + Lock* oldlock = NULL; + tl_assert(HG_(is_sane_ThreadId)(tid)); + found = VG_(lookupFM)( map_locks, + NULL, (Word*)&oldlock, (Word)ga ); + if (!found) { + Lock* lock = mk_LockN(lkk, ga); + lock->appeared_at = VG_(record_ExeContext)( tid, 0 ); + tl_assert(HG_(is_sane_LockN)(lock)); + VG_(addToFM)( map_locks, (Word)ga, (Word)lock ); + tl_assert(oldlock == NULL); + return lock; + } else { + tl_assert(oldlock != NULL); + tl_assert(HG_(is_sane_LockN)(oldlock)); + tl_assert(oldlock->guestaddr == ga); + return oldlock; + } +} + +static Lock* map_locks_maybe_lookup ( Addr ga ) +{ + Bool found; + Lock* lk = NULL; + found = VG_(lookupFM)( map_locks, NULL, (Word*)&lk, (Word)ga ); + tl_assert(found ? lk != NULL : lk == NULL); + return lk; +} + +static void map_locks_delete ( Addr ga ) +{ + Addr ga2 = 0; + Lock* lk = NULL; + VG_(delFromFM)( map_locks, + (Word*)&ga2, (Word*)&lk, (Word)ga ); + /* delFromFM produces the val which is being deleted, if it is + found. So assert it is non-null; that in effect asserts that we + are deleting a (ga, Lock) pair which actually exists. */ + tl_assert(lk != NULL); + tl_assert(ga2 == ga); +} + + + +/*----------------------------------------------------------------*/ +/*--- Sanity checking the data structures ---*/ +/*----------------------------------------------------------------*/ + +static UWord stats__sanity_checks = 0; + +static void laog__sanity_check ( Char* who ); /* fwds */ + +/* REQUIRED INVARIANTS: + + Thread vs Segment/Lock/SecMaps + + for each t in Threads { + + // Thread.lockset: each element is really a valid Lock + + // Thread.lockset: each Lock in set is actually held by that thread + for lk in Thread.lockset + lk == LockedBy(t) + + // Thread.csegid is a valid SegmentID + // and the associated Segment has .thr == t + + } + + all thread Locksets are pairwise empty under intersection + (that is, no lock is claimed to be held by more than one thread) + -- this is guaranteed if all locks in locksets point back to their + owner threads + + Lock vs Thread/Segment/SecMaps + + for each entry (gla, la) in map_locks + gla == la->guest_addr + + for each lk in Locks { + + lk->tag is valid + lk->guest_addr does not have shadow state NoAccess + if lk == LockedBy(t), then t->lockset contains lk + if lk == UnlockedBy(segid) then segid is valid SegmentID + and can be mapped to a valid Segment(seg) + and seg->thr->lockset does not contain lk + if lk == UnlockedNew then (no lockset contains lk) + + secmaps for lk has .mbHasLocks == True + + } + + Segment vs Thread/Lock/SecMaps + + the Segment graph is a dag (no cycles) + all of the Segment graph must be reachable from the segids + mentioned in the Threads + + for seg in Segments { + + seg->thr is a sane Thread + + } + + SecMaps vs Segment/Thread/Lock + + for sm in SecMaps { + + sm properly aligned + if any shadow word is ShR or ShM then .mbHasShared == True + + for each Excl(segid) state + map_segments_lookup maps to a sane Segment(seg) + for each ShM/ShR(tsetid,lsetid) state + each lk in lset is a valid Lock + each thr in tset is a valid thread, which is non-dead + + } +*/ + + +/* Return True iff 'thr' holds 'lk' in some mode. */ +static Bool thread_is_a_holder_of_Lock ( Thread* thr, Lock* lk ) +{ + if (lk->heldBy) + return VG_(elemBag)( lk->heldBy, (Word)thr ) > 0; + else + return False; +} + +/* Sanity check Threads, as far as possible */ +__attribute__((noinline)) +static void threads__sanity_check ( Char* who ) +{ +#define BAD(_str) do { how = (_str); goto bad; } while (0) + Char* how = "no error"; + Thread* thr; + WordSetID wsA, wsW; + UWord* ls_words; + Word ls_size, i; + Lock* lk; + for (thr = admin_threads; thr; thr = thr->admin) { + if (!HG_(is_sane_Thread)(thr)) BAD("1"); + wsA = thr->locksetA; + wsW = thr->locksetW; + // locks held in W mode are a subset of all locks held + if (!HG_(isSubsetOf)( univ_lsets, wsW, wsA )) BAD("7"); + HG_(getPayloadWS)( &ls_words, &ls_size, univ_lsets, wsA ); + for (i = 0; i < ls_size; i++) { + lk = (Lock*)ls_words[i]; + // Thread.lockset: each element is really a valid Lock + if (!HG_(is_sane_LockN)(lk)) BAD("2"); + // Thread.lockset: each Lock in set is actually held by that + // thread + if (!thread_is_a_holder_of_Lock(thr,lk)) BAD("3"); + } + } + return; + bad: + VG_(printf)("threads__sanity_check: who=\"%s\", bad=\"%s\"\n", who, how); + tl_assert(0); +#undef BAD +} + + +/* Sanity check Locks, as far as possible */ +__attribute__((noinline)) +static void locks__sanity_check ( Char* who ) +{ +#define BAD(_str) do { how = (_str); goto bad; } while (0) + Char* how = "no error"; + Addr gla; + Lock* lk; + Int i; + // # entries in admin_locks == # entries in map_locks + for (i = 0, lk = admin_locks; lk; i++, lk = lk->admin) + ; + if (i != VG_(sizeFM)(map_locks)) BAD("1"); + // for each entry (gla, lk) in map_locks + // gla == lk->guest_addr + VG_(initIterFM)( map_locks ); + while (VG_(nextIterFM)( map_locks, + (Word*)&gla, (Word*)&lk )) { + if (lk->guestaddr != gla) BAD("2"); + } + VG_(doneIterFM)( map_locks ); + // scan through admin_locks ... + for (lk = admin_locks; lk; lk = lk->admin) { + // lock is sane. Quite comprehensive, also checks that + // referenced (holder) threads are sane. + if (!HG_(is_sane_LockN)(lk)) BAD("3"); + // map_locks binds guest address back to this lock + if (lk != map_locks_maybe_lookup(lk->guestaddr)) BAD("4"); + // look at all threads mentioned as holders of this lock. Ensure + // this lock is mentioned in their locksets. + if (lk->heldBy) { + Thread* thr; + Word count; + VG_(initIterBag)( lk->heldBy ); + while (VG_(nextIterBag)( lk->heldBy, + (Word*)&thr, &count )) { + // HG_(is_sane_LockN) above ensures these + tl_assert(count >= 1); + tl_assert(HG_(is_sane_Thread)(thr)); + if (!HG_(elemWS)(univ_lsets, thr->locksetA, (Word)lk)) + BAD("6"); + // also check the w-only lockset + if (lk->heldW + && !HG_(elemWS)(univ_lsets, thr->locksetW, (Word)lk)) + BAD("7"); + if ((!lk->heldW) + && HG_(elemWS)(univ_lsets, thr->locksetW, (Word)lk)) + BAD("8"); + } + VG_(doneIterBag)( lk->heldBy ); + } else { + /* lock not held by anybody */ + if (lk->heldW) BAD("9"); /* should be False if !heldBy */ + // since lk is unheld, then (no lockset contains lk) + // hmm, this is really too expensive to check. Hmm. + } + } + + return; + bad: + VG_(printf)("locks__sanity_check: who=\"%s\", bad=\"%s\"\n", who, how); + tl_assert(0); +#undef BAD +} + + +static void all_except_Locks__sanity_check ( Char* who ) { + stats__sanity_checks++; + if (0) VG_(printf)("all_except_Locks__sanity_check(%s)\n", who); + threads__sanity_check(who); + laog__sanity_check(who); +} +static void all__sanity_check ( Char* who ) { + all_except_Locks__sanity_check(who); + locks__sanity_check(who); +} + + +/*----------------------------------------------------------------*/ +/*--- the core memory state machine (msm__* functions) ---*/ +/*----------------------------------------------------------------*/ + +//static WordSetID add_BHL ( WordSetID lockset ) { +// return HG_(addToWS)( univ_lsets, lockset, (Word)__bus_lock_Lock ); +//} +//static WordSetID del_BHL ( WordSetID lockset ) { +// return HG_(delFromWS)( univ_lsets, lockset, (Word)__bus_lock_Lock ); +//} + + +///* Last-lock-lossage records. This mechanism exists to help explain +// to programmers why we are complaining about a race. The idea is to +// monitor all lockset transitions. When a previously nonempty +// lockset becomes empty, the lock(s) that just disappeared (the +// "lossage") are the locks that have consistently protected the +// location (ga_of_access) in question for the longest time. Most of +// the time the lossage-set is a single lock. Because the +// lossage-lock is the one that has survived longest, there is there +// is a good chance that it is indeed the lock that the programmer +// intended to use to protect the location. +// +// Note that we cannot in general just look at the lossage set when we +// see a transition to ShM(...,empty-set), because a transition to an +// empty lockset can happen arbitrarily far before the point where we +// want to report an error. This is in the case where there are many +// transitions ShR -> ShR, all with an empty lockset, and only later +// is there a transition to ShM. So what we want to do is note the +// lossage lock at the point where a ShR -> ShR transition empties out +// the lockset, so we can present it later if there should be a +// transition to ShM. +// +// So this function finds such transitions. For each, it associates +// in ga_to_lastlock, the guest address and the lossage lock. In fact +// we do not record the Lock* directly as that may disappear later, +// but instead the ExeContext inside the Lock which says where it was +// initialised or first locked. ExeContexts are permanent so keeping +// them indefinitely is safe. +// +// A boring detail: the hardware bus lock is not interesting in this +// respect, so we first remove that from the pre/post locksets. +//*/ +// +//static UWord stats__ga_LL_adds = 0; +// +//static WordFM* ga_to_lastlock = NULL; /* GuestAddr -> ExeContext* */ +// +//static +//void record_last_lock_lossage ( Addr ga_of_access, +// WordSetID lset_old, WordSetID lset_new ) +//{ +// Lock* lk; +// Int card_old, card_new; +// +// tl_assert(lset_old != lset_new); +// +// if (0) VG_(printf)("XX1: %d (card %ld) -> %d (card %ld) %#lx\n", +// (Int)lset_old, +// HG_(cardinalityWS)(univ_lsets,lset_old), +// (Int)lset_new, +// HG_(cardinalityWS)(univ_lsets,lset_new), +// ga_of_access ); +// +// /* This is slow, but at least it's simple. The bus hardware lock +// just confuses the logic, so remove it from the locksets we're +// considering before doing anything else. */ +// lset_new = del_BHL( lset_new ); +// +// if (!HG_(isEmptyWS)( univ_lsets, lset_new )) { +// /* The post-transition lock set is not empty. So we are not +// interested. We're only interested in spotting transitions +// that make locksets become empty. */ +// return; +// } +// +// /* lset_new is now empty */ +// card_new = HG_(cardinalityWS)( univ_lsets, lset_new ); +// tl_assert(card_new == 0); +// +// lset_old = del_BHL( lset_old ); +// card_old = HG_(cardinalityWS)( univ_lsets, lset_old ); +// +// if (0) VG_(printf)(" X2: %d (card %d) -> %d (card %d)\n", +// (Int)lset_old, card_old, (Int)lset_new, card_new ); +// +// if (card_old == 0) { +// /* The old lockset was also empty. Not interesting. */ +// return; +// } +// +// tl_assert(card_old > 0); +// tl_assert(!HG_(isEmptyWS)( univ_lsets, lset_old )); +// +// /* Now we know we've got a transition from a nonempty lockset to an +// empty one. So lset_old must be the set of locks lost. Record +// some details. If there is more than one element in the lossage +// set, just choose one arbitrarily -- not the best, but at least +// it's simple. */ +// +// lk = (Lock*)HG_(anyElementOfWS)( univ_lsets, lset_old ); +// if (0) VG_(printf)("lossage %ld %p\n", +// HG_(cardinalityWS)( univ_lsets, lset_old), lk ); +// if (lk->appeared_at) { +// if (ga_to_lastlock == NULL) +// ga_to_lastlock = VG_(newFM)( HG_(zalloc), "hg.rlll.1", HG_(free), NULL ); +// VG_(addToFM)( ga_to_lastlock, ga_of_access, (Word)lk->appeared_at ); +// stats__ga_LL_adds++; +// } +//} +// +///* This queries the table (ga_to_lastlock) made by +// record_last_lock_lossage, when constructing error messages. It +// attempts to find the ExeContext of the allocation or initialisation +// point for the lossage lock associated with 'ga'. */ +// +//static ExeContext* maybe_get_lastlock_initpoint ( Addr ga ) +//{ +// ExeContext* ec_hint = NULL; +// if (ga_to_lastlock != NULL +// && VG_(lookupFM)(ga_to_lastlock, +// NULL, (Word*)&ec_hint, ga)) { +// tl_assert(ec_hint != NULL); +// return ec_hint; +// } else { +// return NULL; +// } +//} + + +/*----------------------------------------------------------------*/ +/*--- Shadow value and address range handlers ---*/ +/*----------------------------------------------------------------*/ + +static void laog__pre_thread_acquires_lock ( Thread*, Lock* ); /* fwds */ +//static void laog__handle_lock_deletions ( WordSetID ); /* fwds */ +static inline Thread* get_current_Thread ( void ); /* fwds */ +__attribute__((noinline)) +static void laog__handle_one_lock_deletion ( Lock* lk ); /* fwds */ + + +/* Block-copy states (needed for implementing realloc()). */ +static void shadow_mem_copy_range ( Addr src, Addr dst, SizeT len ) +{ + libhb_copy_shadow_state( src, dst, len ); +} + +static void shadow_mem_read_range ( Thread* thr, Addr a, SizeT len ) +{ + Thr* hbthr = thr->hbthr; + tl_assert(hbthr); + LIBHB_READ_N(hbthr, a, len); +} + +static void shadow_mem_write_range ( Thread* thr, Addr a, SizeT len ) { + Thr* hbthr = thr->hbthr; + tl_assert(hbthr); + LIBHB_WRITE_N(hbthr, a, len); +} + +static void shadow_mem_make_New ( Thread* thr, Addr a, SizeT len ) +{ + libhb_range_new( thr->hbthr, a, len ); +} + +static void shadow_mem_make_NoAccess ( Thread* thr, Addr aIN, SizeT len ) +{ + if (0 && len > 500) + VG_(printf)("make NoAccess ( %#lx, %ld )\n", aIN, len ); + libhb_range_noaccess( thr->hbthr, aIN, len ); +} + + +/*----------------------------------------------------------------*/ +/*--- Event handlers (evh__* functions) ---*/ +/*--- plus helpers (evhH__* functions) ---*/ +/*----------------------------------------------------------------*/ + +/*--------- Event handler helpers (evhH__* functions) ---------*/ + +/* Create a new segment for 'thr', making it depend (.prev) on its + existing segment, bind together the SegmentID and Segment, and + return both of them. Also update 'thr' so it references the new + Segment. */ +//zz static +//zz void evhH__start_new_segment_for_thread ( /*OUT*/SegmentID* new_segidP, +//zz /*OUT*/Segment** new_segP, +//zz Thread* thr ) +//zz { +//zz Segment* cur_seg; +//zz tl_assert(new_segP); +//zz tl_assert(new_segidP); +//zz tl_assert(HG_(is_sane_Thread)(thr)); +//zz cur_seg = map_segments_lookup( thr->csegid ); +//zz tl_assert(cur_seg); +//zz tl_assert(cur_seg->thr == thr); /* all sane segs should point back +//zz at their owner thread. */ +//zz *new_segP = mk_Segment( thr, cur_seg, NULL/*other*/ ); +//zz *new_segidP = alloc_SegmentID(); +//zz map_segments_add( *new_segidP, *new_segP ); +//zz thr->csegid = *new_segidP; +//zz } + + +/* The lock at 'lock_ga' has acquired a writer. Make all necessary + updates, and also do all possible error checks. */ +static +void evhH__post_thread_w_acquires_lock ( Thread* thr, + LockKind lkk, Addr lock_ga ) +{ + Lock* lk; + + /* Basically what we need to do is call lockN_acquire_writer. + However, that will barf if any 'invalid' lock states would + result. Therefore check before calling. Side effect is that + 'HG_(is_sane_LockN)(lk)' is both a pre- and post-condition of this + routine. + + Because this routine is only called after successful lock + acquisition, we should not be asked to move the lock into any + invalid states. Requests to do so are bugs in libpthread, since + that should have rejected any such requests. */ + + tl_assert(HG_(is_sane_Thread)(thr)); + /* Try to find the lock. If we can't, then create a new one with + kind 'lkk'. */ + lk = map_locks_lookup_or_create( + lkk, lock_ga, map_threads_reverse_lookup_SLOW(thr) ); + tl_assert( HG_(is_sane_LockN)(lk) ); + + /* check libhb level entities exist */ + tl_assert(thr->hbthr); + tl_assert(lk->hbso); + + if (lk->heldBy == NULL) { + /* the lock isn't held. Simple. */ + tl_assert(!lk->heldW); + lockN_acquire_writer( lk, thr ); + /* acquire a dependency from the lock's VCs */ + libhb_so_recv( thr->hbthr, lk->hbso, True/*strong_recv*/ ); + goto noerror; + } + + /* So the lock is already held. If held as a r-lock then + libpthread must be buggy. */ + tl_assert(lk->heldBy); + if (!lk->heldW) { + HG_(record_error_Misc)( + thr, "Bug in libpthread: write lock " + "granted on rwlock which is currently rd-held"); + goto error; + } + + /* So the lock is held in w-mode. If it's held by some other + thread, then libpthread must be buggy. */ + tl_assert(VG_(sizeUniqueBag)(lk->heldBy) == 1); /* from precondition */ + + if (thr != (Thread*)VG_(anyElementOfBag)(lk->heldBy)) { + HG_(record_error_Misc)( + thr, "Bug in libpthread: write lock " + "granted on mutex/rwlock which is currently " + "wr-held by a different thread"); + goto error; + } + + /* So the lock is already held in w-mode by 'thr'. That means this + is an attempt to lock it recursively, which is only allowable + for LK_mbRec kinded locks. Since this routine is called only + once the lock has been acquired, this must also be a libpthread + bug. */ + if (lk->kind != LK_mbRec) { + HG_(record_error_Misc)( + thr, "Bug in libpthread: recursive write lock " + "granted on mutex/wrlock which does not " + "support recursion"); + goto error; + } + + /* So we are recursively re-locking a lock we already w-hold. */ + lockN_acquire_writer( lk, thr ); + /* acquire a dependency from the lock's VC. Probably pointless, + but also harmless. */ + libhb_so_recv( thr->hbthr, lk->hbso, True/*strong_recv*/ ); + goto noerror; + + noerror: + /* check lock order acquisition graph, and update. This has to + happen before the lock is added to the thread's locksetA/W. */ + laog__pre_thread_acquires_lock( thr, lk ); + /* update the thread's held-locks set */ + thr->locksetA = HG_(addToWS)( univ_lsets, thr->locksetA, (Word)lk ); + thr->locksetW = HG_(addToWS)( univ_lsets, thr->locksetW, (Word)lk ); + /* fall through */ + + error: + tl_assert(HG_(is_sane_LockN)(lk)); +} + + +/* The lock at 'lock_ga' has acquired a reader. Make all necessary + updates, and also do all possible error checks. */ +static +void evhH__post_thread_r_acquires_lock ( Thread* thr, + LockKind lkk, Addr lock_ga ) +{ + Lock* lk; + + /* Basically what we need to do is call lockN_acquire_reader. + However, that will barf if any 'invalid' lock states would + result. Therefore check before calling. Side effect is that + 'HG_(is_sane_LockN)(lk)' is both a pre- and post-condition of this + routine. + + Because this routine is only called after successful lock + acquisition, we should not be asked to move the lock into any + invalid states. Requests to do so are bugs in libpthread, since + that should have rejected any such requests. */ + + tl_assert(HG_(is_sane_Thread)(thr)); + /* Try to find the lock. If we can't, then create a new one with + kind 'lkk'. Only a reader-writer lock can be read-locked, + hence the first assertion. */ + tl_assert(lkk == LK_rdwr); + lk = map_locks_lookup_or_create( + lkk, lock_ga, map_threads_reverse_lookup_SLOW(thr) ); + tl_assert( HG_(is_sane_LockN)(lk) ); + + /* check libhb level entities exist */ + tl_assert(thr->hbthr); + tl_assert(lk->hbso); + + if (lk->heldBy == NULL) { + /* the lock isn't held. Simple. */ + tl_assert(!lk->heldW); + lockN_acquire_reader( lk, thr ); + /* acquire a dependency from the lock's VC */ + libhb_so_recv( thr->hbthr, lk->hbso, False/*!strong_recv*/ ); + goto noerror; + } + + /* So the lock is already held. If held as a w-lock then + libpthread must be buggy. */ + tl_assert(lk->heldBy); + if (lk->heldW) { + HG_(record_error_Misc)( thr, "Bug in libpthread: read lock " + "granted on rwlock which is " + "currently wr-held"); + goto error; + } + + /* Easy enough. In short anybody can get a read-lock on a rwlock + provided it is either unlocked or already in rd-held. */ + lockN_acquire_reader( lk, thr ); + /* acquire a dependency from the lock's VC. Probably pointless, + but also harmless. */ + libhb_so_recv( thr->hbthr, lk->hbso, False/*!strong_recv*/ ); + goto noerror; + + noerror: + /* check lock order acquisition graph, and update. This has to + happen before the lock is added to the thread's locksetA/W. */ + laog__pre_thread_acquires_lock( thr, lk ); + /* update the thread's held-locks set */ + thr->locksetA = HG_(addToWS)( univ_lsets, thr->locksetA, (Word)lk ); + /* but don't update thr->locksetW, since lk is only rd-held */ + /* fall through */ + + error: + tl_assert(HG_(is_sane_LockN)(lk)); +} + + +/* The lock at 'lock_ga' is just about to be unlocked. Make all + necessary updates, and also do all possible error checks. */ +static +void evhH__pre_thread_releases_lock ( Thread* thr, + Addr lock_ga, Bool isRDWR ) +{ + Lock* lock; + Word n; + Bool was_heldW; + + /* This routine is called prior to a lock release, before + libpthread has had a chance to validate the call. Hence we need + to detect and reject any attempts to move the lock into an + invalid state. Such attempts are bugs in the client. + + isRDWR is True if we know from the wrapper context that lock_ga + should refer to a reader-writer lock, and is False if [ditto] + lock_ga should refer to a standard mutex. */ + + tl_assert(HG_(is_sane_Thread)(thr)); + lock = map_locks_maybe_lookup( lock_ga ); + + if (!lock) { + /* We know nothing about a lock at 'lock_ga'. Nevertheless + the client is trying to unlock it. So complain, then ignore + the attempt. */ + HG_(record_error_UnlockBogus)( thr, lock_ga ); + return; + } + + tl_assert(lock->guestaddr == lock_ga); + tl_assert(HG_(is_sane_LockN)(lock)); + + if (isRDWR && lock->kind != LK_rdwr) { + HG_(record_error_Misc)( thr, "pthread_rwlock_unlock with a " + "pthread_mutex_t* argument " ); + } + if ((!isRDWR) && lock->kind == LK_rdwr) { + HG_(record_error_Misc)( thr, "pthread_mutex_unlock with a " + "pthread_rwlock_t* argument " ); + } + + if (!lock->heldBy) { + /* The lock is not held. This indicates a serious bug in the + client. */ + tl_assert(!lock->heldW); + HG_(record_error_UnlockUnlocked)( thr, lock ); + tl_assert(!HG_(elemWS)( univ_lsets, thr->locksetA, (Word)lock )); + tl_assert(!HG_(elemWS)( univ_lsets, thr->locksetW, (Word)lock )); + goto error; + } + + /* test just above dominates */ + tl_assert(lock->heldBy); + was_heldW = lock->heldW; + + /* The lock is held. Is this thread one of the holders? If not, + report a bug in the client. */ + n = VG_(elemBag)( lock->heldBy, (Word)thr ); + tl_assert(n >= 0); + if (n == 0) { + /* We are not a current holder of the lock. This is a bug in + the guest, and (per POSIX pthread rules) the unlock + attempt will fail. So just complain and do nothing + else. */ + Thread* realOwner = (Thread*)VG_(anyElementOfBag)( lock->heldBy ); + tl_assert(HG_(is_sane_Thread)(realOwner)); + tl_assert(realOwner != thr); + tl_assert(!HG_(elemWS)( univ_lsets, thr->locksetA, (Word)lock )); + tl_assert(!HG_(elemWS)( univ_lsets, thr->locksetW, (Word)lock )); + HG_(record_error_UnlockForeign)( thr, realOwner, lock ); + goto error; + } + + /* Ok, we hold the lock 'n' times. */ + tl_assert(n >= 1); + + lockN_release( lock, thr ); + + n--; + tl_assert(n >= 0); + + if (n > 0) { + tl_assert(lock->heldBy); + tl_assert(n == VG_(elemBag)( lock->heldBy, (Word)thr )); + /* We still hold the lock. So either it's a recursive lock + or a rwlock which is currently r-held. */ + tl_assert(lock->kind == LK_mbRec + || (lock->kind == LK_rdwr && !lock->heldW)); + tl_assert(HG_(elemWS)( univ_lsets, thr->locksetA, (Word)lock )); + if (lock->heldW) + tl_assert(HG_(elemWS)( univ_lsets, thr->locksetW, (Word)lock )); + else + tl_assert(!HG_(elemWS)( univ_lsets, thr->locksetW, (Word)lock )); + } else { + /* We no longer hold the lock. */ + tl_assert(!lock->heldBy); + tl_assert(lock->heldW == False); + //if (lock->heldBy) { + // tl_assert(0 == VG_(elemBag)( lock->heldBy, (Word)thr )); + //} + /* update this thread's lockset accordingly. */ + thr->locksetA + = HG_(delFromWS)( univ_lsets, thr->locksetA, (Word)lock ); + thr->locksetW + = HG_(delFromWS)( univ_lsets, thr->locksetW, (Word)lock ); + /* push our VC into the lock */ + tl_assert(thr->hbthr); + tl_assert(lock->hbso); + /* If the lock was previously W-held, then we want to do a + strong send, and if previously R-held, then a weak send. */ + libhb_so_send( thr->hbthr, lock->hbso, was_heldW ); + } + /* fall through */ + + error: + tl_assert(HG_(is_sane_LockN)(lock)); +} + + +/* ---------------------------------------------------------- */ +/* -------- Event handlers proper (evh__* functions) -------- */ +/* ---------------------------------------------------------- */ + +/* What is the Thread* for the currently running thread? This is + absolutely performance critical. We receive notifications from the + core for client code starts/stops, and cache the looked-up result + in 'current_Thread'. Hence, for the vast majority of requests, + finding the current thread reduces to a read of a global variable, + provided get_current_Thread_in_C_C is inlined. + + Outside of client code, current_Thread is NULL, and presumably + any uses of it will cause a segfault. Hence: + + - for uses definitely within client code, use + get_current_Thread_in_C_C. + + - for all other uses, use get_current_Thread. +*/ + +static Thread* current_Thread = NULL; + +static void evh__start_client_code ( ThreadId tid, ULong nDisp ) { + if (0) VG_(printf)("start %d %llu\n", (Int)tid, nDisp); + tl_assert(current_Thread == NULL); + current_Thread = map_threads_lookup( tid ); + tl_assert(current_Thread != NULL); +} +static void evh__stop_client_code ( ThreadId tid, ULong nDisp ) { + if (0) VG_(printf)(" stop %d %llu\n", (Int)tid, nDisp); + tl_assert(current_Thread != NULL); + current_Thread = NULL; + libhb_maybe_GC(); +} +static inline Thread* get_current_Thread_in_C_C ( void ) { + return current_Thread; +} +static inline Thread* get_current_Thread ( void ) { + ThreadId coretid; + Thread* thr; + thr = get_current_Thread_in_C_C(); + if (LIKELY(thr)) + return thr; + /* evidently not in client code. Do it the slow way. */ + coretid = VG_(get_running_tid)(); + /* FIXME: get rid of the following kludge. It exists because + evh__new_mem is called during initialisation (as notification + of initial memory layout) and VG_(get_running_tid)() returns + VG_INVALID_THREADID at that point. */ + if (coretid == VG_INVALID_THREADID) + coretid = 1; /* KLUDGE */ + thr = map_threads_lookup( coretid ); + return thr; +} + +static +void evh__new_mem ( Addr a, SizeT len ) { + if (SHOW_EVENTS >= 2) + VG_(printf)("evh__new_mem(%p, %lu)\n", (void*)a, len ); + shadow_mem_make_New( get_current_Thread(), a, len ); + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__new_mem-post"); +} + +static +void evh__new_mem_w_tid ( Addr a, SizeT len, ThreadId tid ) { + if (SHOW_EVENTS >= 2) + VG_(printf)("evh__new_mem_w_tid(%p, %lu)\n", (void*)a, len ); + shadow_mem_make_New( get_current_Thread(), a, len ); + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__new_mem_w_tid-post"); +} + +static +void evh__new_mem_w_perms ( Addr a, SizeT len, + Bool rr, Bool ww, Bool xx, ULong di_handle ) { + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__new_mem_w_perms(%p, %lu, %d,%d,%d)\n", + (void*)a, len, (Int)rr, (Int)ww, (Int)xx ); + if (rr || ww || xx) + shadow_mem_make_New( get_current_Thread(), a, len ); + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__new_mem_w_perms-post"); +} + +static +void evh__set_perms ( Addr a, SizeT len, + Bool rr, Bool ww, Bool xx ) { + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__set_perms(%p, %lu, %d,%d,%d)\n", + (void*)a, len, (Int)rr, (Int)ww, (Int)xx ); + /* Hmm. What should we do here, that actually makes any sense? + Let's say: if neither readable nor writable, then declare it + NoAccess, else leave it alone. */ + if (!(rr || ww)) + shadow_mem_make_NoAccess( get_current_Thread(), a, len ); + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__set_perms-post"); +} + +static +void evh__die_mem ( Addr a, SizeT len ) { + if (SHOW_EVENTS >= 2) + VG_(printf)("evh__die_mem(%p, %lu)\n", (void*)a, len ); + shadow_mem_make_NoAccess( get_current_Thread(), a, len ); + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__die_mem-post"); +} + +static +void evh__pre_thread_ll_create ( ThreadId parent, ThreadId child ) +{ + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__pre_thread_ll_create(p=%d, c=%d)\n", + (Int)parent, (Int)child ); + + if (parent != VG_INVALID_THREADID) { + Thread* thr_p; + Thread* thr_c; + Thr* hbthr_p; + Thr* hbthr_c; + + tl_assert(HG_(is_sane_ThreadId)(parent)); + tl_assert(HG_(is_sane_ThreadId)(child)); + tl_assert(parent != child); + + thr_p = map_threads_maybe_lookup( parent ); + thr_c = map_threads_maybe_lookup( child ); + + tl_assert(thr_p != NULL); + tl_assert(thr_c == NULL); + + hbthr_p = thr_p->hbthr; + tl_assert(hbthr_p != NULL); + tl_assert( libhb_get_Thr_opaque(hbthr_p) == thr_p ); + + hbthr_c = libhb_create ( hbthr_p ); + + /* Create a new thread record for the child. */ + /* a Thread for the new thread ... */ + thr_c = mk_Thread( hbthr_c ); + tl_assert( libhb_get_Thr_opaque(hbthr_c) == NULL ); + libhb_set_Thr_opaque(hbthr_c, thr_c); + + /* and bind it in the thread-map table */ + map_threads[child] = thr_c; + tl_assert(thr_c->coretid == VG_INVALID_THREADID); + thr_c->coretid = child; + + /* Record where the parent is so we can later refer to this in + error messages. + + On amd64-linux, this entails a nasty glibc-2.5 specific hack. + The stack snapshot is taken immediately after the parent has + returned from its sys_clone call. Unfortunately there is no + unwind info for the insn following "syscall" - reading the + glibc sources confirms this. So we ask for a snapshot to be + taken as if RIP was 3 bytes earlier, in a place where there + is unwind info. Sigh. + */ + { Word first_ip_delta = 0; +# if defined(VGP_amd64_linux) + first_ip_delta = -3; +# endif + thr_c->created_at = VG_(record_ExeContext)(parent, first_ip_delta); + } + } + + if (HG_(clo_sanity_flags) & SCE_THREADS) + all__sanity_check("evh__pre_thread_create-post"); +} + +static +void evh__pre_thread_ll_exit ( ThreadId quit_tid ) +{ + Int nHeld; + Thread* thr_q; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__pre_thread_ll_exit(thr=%d)\n", + (Int)quit_tid ); + + /* quit_tid has disappeared without joining to any other thread. + Therefore there is no synchronisation event associated with its + exit and so we have to pretty much treat it as if it was still + alive but mysteriously making no progress. That is because, if + we don't know when it really exited, then we can never say there + is a point in time when we're sure the thread really has + finished, and so we need to consider the possibility that it + lingers indefinitely and continues to interact with other + threads. */ + /* However, it might have rendezvous'd with a thread that called + pthread_join with this one as arg, prior to this point (that's + how NPTL works). In which case there has already been a prior + sync event. So in any case, just let the thread exit. On NPTL, + all thread exits go through here. */ + tl_assert(HG_(is_sane_ThreadId)(quit_tid)); + thr_q = map_threads_maybe_lookup( quit_tid ); + tl_assert(thr_q != NULL); + + /* Complain if this thread holds any locks. */ + nHeld = HG_(cardinalityWS)( univ_lsets, thr_q->locksetA ); + tl_assert(nHeld >= 0); + if (nHeld > 0) { + HChar buf[80]; + VG_(sprintf)(buf, "Exiting thread still holds %d lock%s", + nHeld, nHeld > 1 ? "s" : ""); + HG_(record_error_Misc)( thr_q, buf ); + } + + /* About the only thing we do need to do is clear the map_threads + entry, in order that the Valgrind core can re-use it. */ + tl_assert(thr_q->coretid == quit_tid); + thr_q->coretid = VG_INVALID_THREADID; + map_threads_delete( quit_tid ); + + if (HG_(clo_sanity_flags) & SCE_THREADS) + all__sanity_check("evh__pre_thread_ll_exit-post"); +} + + +static +void evh__HG_PTHREAD_JOIN_POST ( ThreadId stay_tid, Thread* quit_thr ) +{ + Thread* thr_s; + Thread* thr_q; + Thr* hbthr_s; + Thr* hbthr_q; + SO* so; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__post_thread_join(stayer=%d, quitter=%p)\n", + (Int)stay_tid, quit_thr ); + + tl_assert(HG_(is_sane_ThreadId)(stay_tid)); + + thr_s = map_threads_maybe_lookup( stay_tid ); + thr_q = quit_thr; + tl_assert(thr_s != NULL); + tl_assert(thr_q != NULL); + tl_assert(thr_s != thr_q); + + hbthr_s = thr_s->hbthr; + hbthr_q = thr_q->hbthr; + tl_assert(hbthr_s != hbthr_q); + tl_assert( libhb_get_Thr_opaque(hbthr_s) == thr_s ); + tl_assert( libhb_get_Thr_opaque(hbthr_q) == thr_q ); + + /* Allocate a temporary synchronisation object and use it to send + an imaginary message from the quitter to the stayer, the purpose + being to generate a dependence from the quitter to the + stayer. */ + so = libhb_so_alloc(); + tl_assert(so); + libhb_so_send(hbthr_q, so, True/*strong_send*/); + libhb_so_recv(hbthr_s, so, True/*strong_recv*/); + libhb_so_dealloc(so); + + /* evh__pre_thread_ll_exit issues an error message if the exiting + thread holds any locks. No need to check here. */ + + /* This holds because, at least when using NPTL as the thread + library, we should be notified the low level thread exit before + we hear of any join event on it. The low level exit + notification feeds through into evh__pre_thread_ll_exit, + which should clear the map_threads entry for it. Hence we + expect there to be no map_threads entry at this point. */ + tl_assert( map_threads_maybe_reverse_lookup_SLOW(thr_q) + == VG_INVALID_THREADID); + + if (HG_(clo_sanity_flags) & SCE_THREADS) + all__sanity_check("evh__post_thread_join-post"); +} + +static +void evh__pre_mem_read ( CorePart part, ThreadId tid, Char* s, + Addr a, SizeT size) { + if (SHOW_EVENTS >= 2 + || (SHOW_EVENTS >= 1 && size != 1)) + VG_(printf)("evh__pre_mem_read(ctid=%d, \"%s\", %p, %lu)\n", + (Int)tid, s, (void*)a, size ); + shadow_mem_read_range( map_threads_lookup(tid), a, size); + if (size >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__pre_mem_read-post"); +} + +static +void evh__pre_mem_read_asciiz ( CorePart part, ThreadId tid, + Char* s, Addr a ) { + Int len; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__pre_mem_asciiz(ctid=%d, \"%s\", %p)\n", + (Int)tid, s, (void*)a ); + // FIXME: think of a less ugly hack + len = VG_(strlen)( (Char*) a ); + shadow_mem_read_range( map_threads_lookup(tid), a, len+1 ); + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__pre_mem_read_asciiz-post"); +} + +static +void evh__pre_mem_write ( CorePart part, ThreadId tid, Char* s, + Addr a, SizeT size ) { + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__pre_mem_write(ctid=%d, \"%s\", %p, %lu)\n", + (Int)tid, s, (void*)a, size ); + shadow_mem_write_range( map_threads_lookup(tid), a, size); + if (size >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__pre_mem_write-post"); +} + +static +void evh__new_mem_heap ( Addr a, SizeT len, Bool is_inited ) { + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__new_mem_heap(%p, %lu, inited=%d)\n", + (void*)a, len, (Int)is_inited ); + // FIXME: this is kinda stupid + if (is_inited) { + shadow_mem_make_New(get_current_Thread(), a, len); + } else { + shadow_mem_make_New(get_current_Thread(), a, len); + } + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__pre_mem_read-post"); +} + +static +void evh__die_mem_heap ( Addr a, SizeT len ) { + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__die_mem_heap(%p, %lu)\n", (void*)a, len ); + shadow_mem_make_NoAccess( get_current_Thread(), a, len ); + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__pre_mem_read-post"); +} + +static VG_REGPARM(1) +void evh__mem_help_read_1(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_READ_1(hbthr, a); +} + +static VG_REGPARM(1) +void evh__mem_help_read_2(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_READ_2(hbthr, a); +} + +static VG_REGPARM(1) +void evh__mem_help_read_4(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_READ_4(hbthr, a); +} + +static VG_REGPARM(1) +void evh__mem_help_read_8(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_READ_8(hbthr, a); +} + +static VG_REGPARM(2) +void evh__mem_help_read_N(Addr a, SizeT size) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_READ_N(hbthr, a, size); +} + +static VG_REGPARM(1) +void evh__mem_help_write_1(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_WRITE_1(hbthr, a); +} + +static VG_REGPARM(1) +void evh__mem_help_write_2(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_WRITE_2(hbthr, a); +} + +static VG_REGPARM(1) +void evh__mem_help_write_4(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_WRITE_4(hbthr, a); +} + +static VG_REGPARM(1) +void evh__mem_help_write_8(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_WRITE_8(hbthr, a); +} + +static VG_REGPARM(2) +void evh__mem_help_write_N(Addr a, SizeT size) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_WRITE_N(hbthr, a, size); +} + +//static void evh__bus_lock(void) { +// Thread* thr; +// if (0) VG_(printf)("evh__bus_lock()\n"); +// thr = get_current_Thread(); +// tl_assert(thr); /* cannot fail - Thread* must already exist */ +// evhH__post_thread_w_acquires_lock( thr, LK_nonRec, (Addr)&__bus_lock ); +//} +//static void evh__bus_unlock(void) { +// Thread* thr; +// if (0) VG_(printf)("evh__bus_unlock()\n"); +// thr = get_current_Thread(); +// tl_assert(thr); /* cannot fail - Thread* must already exist */ +// evhH__pre_thread_releases_lock( thr, (Addr)&__bus_lock, False/*!isRDWR*/ ); +//} + +/* ------------------------------------------------------- */ +/* -------------- events to do with mutexes -------------- */ +/* ------------------------------------------------------- */ + +/* EXPOSITION only: by intercepting lock init events we can show the + user where the lock was initialised, rather than only being able to + show where it was first locked. Intercepting lock initialisations + is not necessary for the basic operation of the race checker. */ +static +void evh__HG_PTHREAD_MUTEX_INIT_POST( ThreadId tid, + void* mutex, Word mbRec ) +{ + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_MUTEX_INIT_POST(ctid=%d, mbRec=%ld, %p)\n", + (Int)tid, mbRec, (void*)mutex ); + tl_assert(mbRec == 0 || mbRec == 1); + map_locks_lookup_or_create( mbRec ? LK_mbRec : LK_nonRec, + (Addr)mutex, tid ); + if (HG_(clo_sanity_flags) & SCE_LOCKS) + all__sanity_check("evh__hg_PTHREAD_MUTEX_INIT_POST"); +} + +static +void evh__HG_PTHREAD_MUTEX_DESTROY_PRE( ThreadId tid, void* mutex ) +{ + Thread* thr; + Lock* lk; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_MUTEX_DESTROY_PRE(ctid=%d, %p)\n", + (Int)tid, (void*)mutex ); + + thr = map_threads_maybe_lookup( tid ); + /* cannot fail - Thread* must already exist */ + tl_assert( HG_(is_sane_Thread)(thr) ); + + lk = map_locks_maybe_lookup( (Addr)mutex ); + + if (lk == NULL || (lk->kind != LK_nonRec && lk->kind != LK_mbRec)) { + HG_(record_error_Misc)( + thr, "pthread_mutex_destroy with invalid argument" ); + } + + if (lk) { + tl_assert( HG_(is_sane_LockN)(lk) ); + tl_assert( lk->guestaddr == (Addr)mutex ); + if (lk->heldBy) { + /* Basically act like we unlocked the lock */ + HG_(record_error_Misc)( + thr, "pthread_mutex_destroy of a locked mutex" ); + /* remove lock from locksets of all owning threads */ + remove_Lock_from_locksets_of_all_owning_Threads( lk ); + VG_(deleteBag)( lk->heldBy ); + lk->heldBy = NULL; + lk->heldW = False; + lk->acquired_at = NULL; + } + tl_assert( !lk->heldBy ); + tl_assert( HG_(is_sane_LockN)(lk) ); + + laog__handle_one_lock_deletion(lk); + map_locks_delete( lk->guestaddr ); + del_LockN( lk ); + } + + if (HG_(clo_sanity_flags) & SCE_LOCKS) + all__sanity_check("evh__hg_PTHREAD_MUTEX_DESTROY_PRE"); +} + +static void evh__HG_PTHREAD_MUTEX_LOCK_PRE ( ThreadId tid, + void* mutex, Word isTryLock ) +{ + /* Just check the mutex is sane; nothing else to do. */ + // 'mutex' may be invalid - not checked by wrapper + Thread* thr; + Lock* lk; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_MUTEX_LOCK_PRE(ctid=%d, mutex=%p)\n", + (Int)tid, (void*)mutex ); + + tl_assert(isTryLock == 0 || isTryLock == 1); + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + lk = map_locks_maybe_lookup( (Addr)mutex ); + + if (lk && (lk->kind == LK_rdwr)) { + HG_(record_error_Misc)( thr, "pthread_mutex_lock with a " + "pthread_rwlock_t* argument " ); + } + + if ( lk + && isTryLock == 0 + && (lk->kind == LK_nonRec || lk->kind == LK_rdwr) + && lk->heldBy + && lk->heldW + && VG_(elemBag)( lk->heldBy, (Word)thr ) > 0 ) { + /* uh, it's a non-recursive lock and we already w-hold it, and + this is a real lock operation (not a speculative "tryLock" + kind of thing). Duh. Deadlock coming up; but at least + produce an error message. */ + HG_(record_error_Misc)( thr, "Attempt to re-lock a " + "non-recursive lock I already hold" ); + } +} + +static void evh__HG_PTHREAD_MUTEX_LOCK_POST ( ThreadId tid, void* mutex ) +{ + // only called if the real library call succeeded - so mutex is sane + Thread* thr; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_MUTEX_LOCK_POST(ctid=%d, mutex=%p)\n", + (Int)tid, (void*)mutex ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + evhH__post_thread_w_acquires_lock( + thr, + LK_mbRec, /* if not known, create new lock with this LockKind */ + (Addr)mutex + ); +} + +static void evh__HG_PTHREAD_MUTEX_UNLOCK_PRE ( ThreadId tid, void* mutex ) +{ + // 'mutex' may be invalid - not checked by wrapper + Thread* thr; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_MUTEX_UNLOCK_PRE(ctid=%d, mutex=%p)\n", + (Int)tid, (void*)mutex ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + evhH__pre_thread_releases_lock( thr, (Addr)mutex, False/*!isRDWR*/ ); +} + +static void evh__HG_PTHREAD_MUTEX_UNLOCK_POST ( ThreadId tid, void* mutex ) +{ + // only called if the real library call succeeded - so mutex is sane + Thread* thr; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_MUTEX_UNLOCK_POST(ctid=%d, mutex=%p)\n", + (Int)tid, (void*)mutex ); + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + // anything we should do here? +} + + +/* ----------------------------------------------------- */ +/* --------------- events to do with CVs --------------- */ +/* ----------------------------------------------------- */ + +/* A mapping from CV to the SO associated with it. When the CV is + signalled/broadcasted upon, we do a 'send' into the SO, and when a + wait on it completes, we do a 'recv' from the SO. This is believed + to give the correct happens-before events arising from CV + signallings/broadcasts. +*/ + +/* pthread_mutex_cond* -> SO* */ +static WordFM* map_cond_to_SO = NULL; + +static void map_cond_to_SO_INIT ( void ) { + if (UNLIKELY(map_cond_to_SO == NULL)) { + map_cond_to_SO = VG_(newFM)( HG_(zalloc), + "hg.mctSI.1", HG_(free), NULL ); + tl_assert(map_cond_to_SO != NULL); + } +} + +static SO* map_cond_to_SO_lookup_or_alloc ( void* cond ) { + UWord key, val; + map_cond_to_SO_INIT(); + if (VG_(lookupFM)( map_cond_to_SO, &key, &val, (UWord)cond )) { + tl_assert(key == (UWord)cond); + return (SO*)val; + } else { + SO* so = libhb_so_alloc(); + VG_(addToFM)( map_cond_to_SO, (UWord)cond, (UWord)so ); + return so; + } +} + +static void map_cond_to_SO_delete ( void* cond ) { + UWord keyW, valW; + map_cond_to_SO_INIT(); + if (VG_(delFromFM)( map_cond_to_SO, &keyW, &valW, (UWord)cond )) { + SO* so = (SO*)valW; + tl_assert(keyW == (UWord)cond); + libhb_so_dealloc(so); + } +} + +static void evh__HG_PTHREAD_COND_SIGNAL_PRE ( ThreadId tid, void* cond ) +{ + /* 'tid' has signalled on 'cond'. As per the comment above, bind + cond to a SO if it is not already so bound, and 'send' on the + SO. This is later used by other thread(s) which successfully + exit from a pthread_cond_wait on the same cv; then they 'recv' + from the SO, thereby acquiring a dependency on this signalling + event. */ + Thread* thr; + SO* so; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_COND_SIGNAL_PRE(ctid=%d, cond=%p)\n", + (Int)tid, (void*)cond ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + // error-if: mutex is bogus + // error-if: mutex is not locked + + so = map_cond_to_SO_lookup_or_alloc( cond ); + tl_assert(so); + + libhb_so_send( thr->hbthr, so, True/*strong_send*/ ); +} + +/* returns True if it reckons 'mutex' is valid and held by this + thread, else False */ +static Bool evh__HG_PTHREAD_COND_WAIT_PRE ( ThreadId tid, + void* cond, void* mutex ) +{ + Thread* thr; + Lock* lk; + Bool lk_valid = True; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_COND_WAIT_PRE" + "(ctid=%d, cond=%p, mutex=%p)\n", + (Int)tid, (void*)cond, (void*)mutex ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + lk = map_locks_maybe_lookup( (Addr)mutex ); + + /* Check for stupid mutex arguments. There are various ways to be + a bozo. Only complain once, though, even if more than one thing + is wrong. */ + if (lk == NULL) { + lk_valid = False; + HG_(record_error_Misc)( + thr, + "pthread_cond_{timed}wait called with invalid mutex" ); + } else { + tl_assert( HG_(is_sane_LockN)(lk) ); + if (lk->kind == LK_rdwr) { + lk_valid = False; + HG_(record_error_Misc)( + thr, "pthread_cond_{timed}wait called with mutex " + "of type pthread_rwlock_t*" ); + } else + if (lk->heldBy == NULL) { + lk_valid = False; + HG_(record_error_Misc)( + thr, "pthread_cond_{timed}wait called with un-held mutex"); + } else + if (lk->heldBy != NULL + && VG_(elemBag)( lk->heldBy, (Word)thr ) == 0) { + lk_valid = False; + HG_(record_error_Misc)( + thr, "pthread_cond_{timed}wait called with mutex " + "held by a different thread" ); + } + } + + // error-if: cond is also associated with a different mutex + + return lk_valid; +} + +static void evh__HG_PTHREAD_COND_WAIT_POST ( ThreadId tid, + void* cond, void* mutex ) +{ + /* A pthread_cond_wait(cond, mutex) completed successfully. Find + the SO for this cond, and 'recv' from it so as to acquire a + dependency edge back to the signaller/broadcaster. */ + Thread* thr; + SO* so; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_COND_WAIT_POST" + "(ctid=%d, cond=%p, mutex=%p)\n", + (Int)tid, (void*)cond, (void*)mutex ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + // error-if: cond is also associated with a different mutex + + so = map_cond_to_SO_lookup_or_alloc( cond ); + tl_assert(so); + + if (!libhb_so_everSent(so)) { + /* Hmm. How can a wait on 'cond' succeed if nobody signalled + it? If this happened it would surely be a bug in the threads + library. Or one of those fabled "spurious wakeups". */ + HG_(record_error_Misc)( thr, "Bug in libpthread: pthread_cond_wait " + "succeeded on" + " without prior pthread_cond_post"); + } + + /* anyway, acquire a dependency on it. */ + libhb_so_recv( thr->hbthr, so, True/*strong_recv*/ ); +} + +static void evh__HG_PTHREAD_COND_DESTROY_PRE ( ThreadId tid, + void* cond ) +{ + /* Deal with destroy events. The only purpose is to free storage + associated with the CV, so as to avoid any possible resource + leaks. */ + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_COND_DESTROY_PRE" + "(ctid=%d, cond=%p)\n", + (Int)tid, (void*)cond ); + + map_cond_to_SO_delete( cond ); +} + + +/* ------------------------------------------------------- */ +/* -------------- events to do with rwlocks -------------- */ +/* ------------------------------------------------------- */ + +/* EXPOSITION only */ +static +void evh__HG_PTHREAD_RWLOCK_INIT_POST( ThreadId tid, void* rwl ) +{ + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_RWLOCK_INIT_POST(ctid=%d, %p)\n", + (Int)tid, (void*)rwl ); + map_locks_lookup_or_create( LK_rdwr, (Addr)rwl, tid ); + if (HG_(clo_sanity_flags) & SCE_LOCKS) + all__sanity_check("evh__hg_PTHREAD_RWLOCK_INIT_POST"); +} + +static +void evh__HG_PTHREAD_RWLOCK_DESTROY_PRE( ThreadId tid, void* rwl ) +{ + Thread* thr; + Lock* lk; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_RWLOCK_DESTROY_PRE(ctid=%d, %p)\n", + (Int)tid, (void*)rwl ); + + thr = map_threads_maybe_lookup( tid ); + /* cannot fail - Thread* must already exist */ + tl_assert( HG_(is_sane_Thread)(thr) ); + + lk = map_locks_maybe_lookup( (Addr)rwl ); + + if (lk == NULL || lk->kind != LK_rdwr) { + HG_(record_error_Misc)( + thr, "pthread_rwlock_destroy with invalid argument" ); + } + + if (lk) { + tl_assert( HG_(is_sane_LockN)(lk) ); + tl_assert( lk->guestaddr == (Addr)rwl ); + if (lk->heldBy) { + /* Basically act like we unlocked the lock */ + HG_(record_error_Misc)( + thr, "pthread_rwlock_destroy of a locked mutex" ); + /* remove lock from locksets of all owning threads */ + remove_Lock_from_locksets_of_all_owning_Threads( lk ); + VG_(deleteBag)( lk->heldBy ); + lk->heldBy = NULL; + lk->heldW = False; + lk->acquired_at = NULL; + } + tl_assert( !lk->heldBy ); + tl_assert( HG_(is_sane_LockN)(lk) ); + + laog__handle_one_lock_deletion(lk); + map_locks_delete( lk->guestaddr ); + del_LockN( lk ); + } + + if (HG_(clo_sanity_flags) & SCE_LOCKS) + all__sanity_check("evh__hg_PTHREAD_RWLOCK_DESTROY_PRE"); +} + +static +void evh__HG_PTHREAD_RWLOCK_LOCK_PRE ( ThreadId tid, + void* rwl, + Word isW, Word isTryLock ) +{ + /* Just check the rwl is sane; nothing else to do. */ + // 'rwl' may be invalid - not checked by wrapper + Thread* thr; + Lock* lk; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_RWLOCK_LOCK_PRE(ctid=%d, isW=%d, %p)\n", + (Int)tid, (Int)isW, (void*)rwl ); + + tl_assert(isW == 0 || isW == 1); /* assured us by wrapper */ + tl_assert(isTryLock == 0 || isTryLock == 1); /* assured us by wrapper */ + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + lk = map_locks_maybe_lookup( (Addr)rwl ); + if ( lk + && (lk->kind == LK_nonRec || lk->kind == LK_mbRec) ) { + /* Wrong kind of lock. Duh. */ + HG_(record_error_Misc)( + thr, "pthread_rwlock_{rd,rw}lock with a " + "pthread_mutex_t* argument " ); + } +} + +static +void evh__HG_PTHREAD_RWLOCK_LOCK_POST ( ThreadId tid, void* rwl, Word isW ) +{ + // only called if the real library call succeeded - so mutex is sane + Thread* thr; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_RWLOCK_LOCK_POST(ctid=%d, isW=%d, %p)\n", + (Int)tid, (Int)isW, (void*)rwl ); + + tl_assert(isW == 0 || isW == 1); /* assured us by wrapper */ + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + (isW ? evhH__post_thread_w_acquires_lock + : evhH__post_thread_r_acquires_lock)( + thr, + LK_rdwr, /* if not known, create new lock with this LockKind */ + (Addr)rwl + ); +} + +static void evh__HG_PTHREAD_RWLOCK_UNLOCK_PRE ( ThreadId tid, void* rwl ) +{ + // 'rwl' may be invalid - not checked by wrapper + Thread* thr; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_RWLOCK_UNLOCK_PRE(ctid=%d, rwl=%p)\n", + (Int)tid, (void*)rwl ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + evhH__pre_thread_releases_lock( thr, (Addr)rwl, True/*isRDWR*/ ); +} + +static void evh__HG_PTHREAD_RWLOCK_UNLOCK_POST ( ThreadId tid, void* rwl ) +{ + // only called if the real library call succeeded - so mutex is sane + Thread* thr; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_RWLOCK_UNLOCK_POST(ctid=%d, rwl=%p)\n", + (Int)tid, (void*)rwl ); + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + // anything we should do here? +} + + +/* ---------------------------------------------------------- */ +/* -------------- events to do with semaphores -------------- */ +/* ---------------------------------------------------------- */ + +/* This is similar to but not identical to the handling for condition + variables. */ + +/* For each semaphore, we maintain a stack of SOs. When a 'post' + operation is done on a semaphore (unlocking, essentially), a new SO + is created for the posting thread, the posting thread does a strong + send to it (which merely installs the posting thread's VC in the + SO), and the SO is pushed on the semaphore's stack. + + Later, when a (probably different) thread completes 'wait' on the + semaphore, we pop a SO off the semaphore's stack (which should be + nonempty), and do a strong recv from it. This mechanism creates + dependencies between posters and waiters of the semaphore. + + It may not be necessary to use a stack - perhaps a bag of SOs would + do. But we do need to keep track of how many unused-up posts have + happened for the semaphore. + + Imagine T1 and T2 both post once on a semaphore S, and T3 waits + twice on S. T3 cannot complete its waits without both T1 and T2 + posting. The above mechanism will ensure that T3 acquires + dependencies on both T1 and T2. + + When a semaphore is initialised with value N, we do as if we'd + posted N times on the semaphore: basically create N SOs and do a + strong send to all of then. This allows up to N waits on the + semaphore to acquire a dependency on the initialisation point, + which AFAICS is the correct behaviour. + + We don't emit an error for DESTROY_PRE on a semaphore we don't know + about. We should. +*/ + +/* sem_t* -> XArray* SO* */ +static WordFM* map_sem_to_SO_stack = NULL; + +static void map_sem_to_SO_stack_INIT ( void ) { + if (map_sem_to_SO_stack == NULL) { + map_sem_to_SO_stack = VG_(newFM)( HG_(zalloc), "hg.mstSs.1", + HG_(free), NULL ); + tl_assert(map_sem_to_SO_stack != NULL); + } +} + +static void push_SO_for_sem ( void* sem, SO* so ) { + UWord keyW; + XArray* xa; + tl_assert(so); + map_sem_to_SO_stack_INIT(); + if (VG_(lookupFM)( map_sem_to_SO_stack, + &keyW, (UWord*)&xa, (UWord)sem )) { + tl_assert(keyW == (UWord)sem); + tl_assert(xa); + VG_(addToXA)( xa, &so ); + } else { + xa = VG_(newXA)( HG_(zalloc), "hg.pSfs.1", HG_(free), sizeof(SO*) ); + VG_(addToXA)( xa, &so ); + VG_(addToFM)( map_sem_to_SO_stack, (Word)sem, (Word)xa ); + } +} + +static SO* mb_pop_SO_for_sem ( void* sem ) { + UWord keyW; + XArray* xa; + SO* so; + map_sem_to_SO_stack_INIT(); + if (VG_(lookupFM)( map_sem_to_SO_stack, + &keyW, (UWord*)&xa, (UWord)sem )) { + /* xa is the stack for this semaphore. */ + Word sz; + tl_assert(keyW == (UWord)sem); + sz = VG_(sizeXA)( xa ); + tl_assert(sz >= 0); + if (sz == 0) + return NULL; /* odd, the stack is empty */ + so = *(SO**)VG_(indexXA)( xa, sz-1 ); + tl_assert(so); + VG_(dropTailXA)( xa, 1 ); + return so; + } else { + /* hmm, that's odd. No stack for this semaphore. */ + return NULL; + } +} + +static void evh__HG_POSIX_SEM_DESTROY_PRE ( ThreadId tid, void* sem ) +{ + UWord keyW, valW; + SO* so; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_POSIX_SEM_DESTROY_PRE(ctid=%d, sem=%p)\n", + (Int)tid, (void*)sem ); + + map_sem_to_SO_stack_INIT(); + + /* Empty out the semaphore's SO stack. This way of doing it is + stupid, but at least it's easy. */ + while (1) { + so = mb_pop_SO_for_sem( sem ); + if (!so) break; + libhb_so_dealloc(so); + } + + if (VG_(delFromFM)( map_sem_to_SO_stack, &keyW, &valW, (UWord)sem )) { + XArray* xa = (XArray*)valW; + tl_assert(keyW == (UWord)sem); + tl_assert(xa); + tl_assert(VG_(sizeXA)(xa) == 0); /* preceding loop just emptied it */ + VG_(deleteXA)(xa); + } +} + +static +void evh__HG_POSIX_SEM_INIT_POST ( ThreadId tid, void* sem, UWord value ) +{ + SO* so; + Thread* thr; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_POSIX_SEM_INIT_POST(ctid=%d, sem=%p, value=%lu)\n", + (Int)tid, (void*)sem, value ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + /* Empty out the semaphore's SO stack. This way of doing it is + stupid, but at least it's easy. */ + while (1) { + so = mb_pop_SO_for_sem( sem ); + if (!so) break; + libhb_so_dealloc(so); + } + + /* If we don't do this check, the following while loop runs us out + of memory for stupid initial values of 'value'. */ + if (value > 10000) { + HG_(record_error_Misc)( + thr, "sem_init: initial value exceeds 10000; using 10000" ); + value = 10000; + } + + /* Now create 'valid' new SOs for the thread, do a strong send to + each of them, and push them all on the stack. */ + for (; value > 0; value--) { + Thr* hbthr = thr->hbthr; + tl_assert(hbthr); + + so = libhb_so_alloc(); + libhb_so_send( hbthr, so, True/*strong send*/ ); + push_SO_for_sem( sem, so ); + } +} + +static void evh__HG_POSIX_SEM_POST_PRE ( ThreadId tid, void* sem ) +{ + /* 'tid' has posted on 'sem'. Create a new SO, do a strong send to + it (iow, write our VC into it, then tick ours), and push the SO + on on a stack of SOs associated with 'sem'. This is later used + by other thread(s) which successfully exit from a sem_wait on + the same sem; by doing a strong recv from SOs popped of the + stack, they acquire dependencies on the posting thread + segment(s). */ + + Thread* thr; + SO* so; + Thr* hbthr; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_POSIX_SEM_POST_PRE(ctid=%d, sem=%p)\n", + (Int)tid, (void*)sem ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + // error-if: sem is bogus + + hbthr = thr->hbthr; + tl_assert(hbthr); + + so = libhb_so_alloc(); + libhb_so_send( hbthr, so, True/*strong send*/ ); + push_SO_for_sem( sem, so ); +} + +static void evh__HG_POSIX_SEM_WAIT_POST ( ThreadId tid, void* sem ) +{ + /* A sem_wait(sem) completed successfully. Pop the posting-SO for + the 'sem' from this semaphore's SO-stack, and do a strong recv + from it. This creates a dependency back to one of the post-ers + for the semaphore. */ + + Thread* thr; + SO* so; + Thr* hbthr; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_POSIX_SEM_WAIT_POST(ctid=%d, sem=%p)\n", + (Int)tid, (void*)sem ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + // error-if: sem is bogus + + so = mb_pop_SO_for_sem( sem ); + + if (so) { + hbthr = thr->hbthr; + tl_assert(hbthr); + + libhb_so_recv( hbthr, so, True/*strong recv*/ ); + libhb_so_dealloc(so); + } else { + /* Hmm. How can a wait on 'sem' succeed if nobody posted to it? + If this happened it would surely be a bug in the threads + library. */ + HG_(record_error_Misc)( + thr, "Bug in libpthread: sem_wait succeeded on" + " semaphore without prior sem_post"); + } +} + + +/* -------------------------------------------------------- */ +/* -------------- events to do with barriers -------------- */ +/* -------------------------------------------------------- */ + +typedef + struct { + Bool initted; /* has it yet been initted by guest? */ + UWord size; /* declared size */ + XArray* waiting; /* XA of Thread*. # present is 0 .. .size */ + } + Bar; + +static Bar* new_Bar ( void ) { + Bar* bar = HG_(zalloc)( "hg.nB.1 (new_Bar)", sizeof(Bar) ); + tl_assert(bar); + /* all fields are zero */ + tl_assert(bar->initted == False); + return bar; +} + +static void delete_Bar ( Bar* bar ) { + tl_assert(bar); + if (bar->waiting) + VG_(deleteXA)(bar->waiting); + HG_(free)(bar); +} + +/* A mapping which stores auxiliary data for barriers. */ + +/* pthread_barrier_t* -> Bar* */ +static WordFM* map_barrier_to_Bar = NULL; + +static void map_barrier_to_Bar_INIT ( void ) { + if (UNLIKELY(map_barrier_to_Bar == NULL)) { + map_barrier_to_Bar = VG_(newFM)( HG_(zalloc), + "hg.mbtBI.1", HG_(free), NULL ); + tl_assert(map_barrier_to_Bar != NULL); + } +} + +static Bar* map_barrier_to_Bar_lookup_or_alloc ( void* barrier ) { + UWord key, val; + map_barrier_to_Bar_INIT(); + if (VG_(lookupFM)( map_barrier_to_Bar, &key, &val, (UWord)barrier )) { + tl_assert(key == (UWord)barrier); + return (Bar*)val; + } else { + Bar* bar = new_Bar(); + VG_(addToFM)( map_barrier_to_Bar, (UWord)barrier, (UWord)bar ); + return bar; + } +} + +static void map_barrier_to_Bar_delete ( void* barrier ) { + UWord keyW, valW; + map_barrier_to_Bar_INIT(); + if (VG_(delFromFM)( map_barrier_to_Bar, &keyW, &valW, (UWord)barrier )) { + Bar* bar = (Bar*)valW; + tl_assert(keyW == (UWord)barrier); + delete_Bar(bar); + } +} + + +static void evh__HG_PTHREAD_BARRIER_INIT_PRE ( ThreadId tid, + void* barrier, + UWord count ) +{ + Thread* thr; + Bar* bar; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_BARRIER_INIT_PRE" + "(tid=%d, barrier=%p, count=%lu)\n", + (Int)tid, (void*)barrier, count ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + if (count == 0) { + HG_(record_error_Misc)( + thr, "pthread_barrier_init: 'count' argument is zero" + ); + } + + bar = map_barrier_to_Bar_lookup_or_alloc(barrier); + tl_assert(bar); + + if (bar->initted) { + HG_(record_error_Misc)( + thr, "pthread_barrier_init: barrier is already initialised" + ); + } + + if (bar->waiting && VG_(sizeXA)(bar->waiting) > 0) { + tl_assert(bar->initted); + HG_(record_error_Misc)( + thr, "pthread_barrier_init: threads are waiting at barrier" + ); + VG_(dropTailXA)(bar->waiting, VG_(sizeXA)(bar->waiting)); + } + if (!bar->waiting) { + bar->waiting = VG_(newXA)( HG_(zalloc), "hg.eHPBIP.1", HG_(free), + sizeof(Thread*) ); + } + + tl_assert(bar->waiting); + tl_assert(VG_(sizeXA)(bar->waiting) == 0); + bar->initted = True; + bar->size = count; +} + + +static void evh__HG_PTHREAD_BARRIER_DESTROY_PRE ( ThreadId tid, + void* barrier ) +{ + Thread* thr; + Bar* bar; + + /* Deal with destroy events. The only purpose is to free storage + associated with the barrier, so as to avoid any possible + resource leaks. */ + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_BARRIER_DESTROY_PRE" + "(tid=%d, barrier=%p)\n", + (Int)tid, (void*)barrier ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + bar = map_barrier_to_Bar_lookup_or_alloc(barrier); + tl_assert(bar); + + if (!bar->initted) { + HG_(record_error_Misc)( + thr, "pthread_barrier_destroy: barrier was never initialised" + ); + } + + if (bar->initted && bar->waiting && VG_(sizeXA)(bar->waiting) > 0) { + HG_(record_error_Misc)( + thr, "pthread_barrier_destroy: threads are waiting at barrier" + ); + } + + /* Maybe we shouldn't do this; just let it persist, so that when it + is reinitialised we don't need to do any dynamic memory + allocation? The downside is a potentially unlimited space leak, + if the client creates (in turn) a large number of barriers all + at different locations. Note that if we do later move to the + don't-delete-it scheme, we need to mark the barrier as + uninitialised again since otherwise a later _init call will + elicit a duplicate-init error. */ + map_barrier_to_Bar_delete( barrier ); +} + + +static void evh__HG_PTHREAD_BARRIER_WAIT_PRE ( ThreadId tid, + void* barrier ) +{ + /* This function gets called after a client thread calls + pthread_barrier_wait but before it arrives at the real + pthread_barrier_wait. + + Why is the following correct? It's a bit subtle. + + If this is not the last thread arriving at the barrier, we simply + note its presence and return. Because valgrind (at least as of + Nov 08) is single threaded, we are guaranteed safe from any race + conditions when in this function -- no other client threads are + running. + + If this is the last thread, then we are again the only running + thread. All the other threads will have either arrived at the + real pthread_barrier_wait or are on their way to it, but in any + case are guaranteed not to be able to move past it, because this + thread is currently in this function and so has not yet arrived + at the real pthread_barrier_wait. That means that: + + 1. While we are in this function, none of the other threads + waiting at the barrier can move past it. + + 2. When this function returns (and simulated execution resumes), + this thread and all other waiting threads will be able to move + past the real barrier. + + Because of this, it is now safe to update the vector clocks of + all threads, to represent the fact that they all arrived at the + barrier and have all moved on. There is no danger of any + complications to do with some threads leaving the barrier and + racing back round to the front, whilst others are still leaving + (which is the primary source of complication in correct handling/ + implementation of barriers). That can't happen because we update + here our data structures so as to indicate that the threads have + passed the barrier, even though, as per (2) above, they are + guaranteed not to pass the barrier until we return. + + This relies crucially on Valgrind being single threaded. If that + changes, this will need to be reconsidered. + */ + Thread* thr; + Bar* bar; + SO* so; + UWord present, i; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_BARRIER_WAIT_PRE" + "(tid=%d, barrier=%p)\n", + (Int)tid, (void*)barrier ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + bar = map_barrier_to_Bar_lookup_or_alloc(barrier); + tl_assert(bar); + + if (!bar->initted) { + HG_(record_error_Misc)( + thr, "pthread_barrier_wait: barrier is uninitialised" + ); + return; /* client is broken .. avoid assertions below */ + } + + /* guaranteed by _INIT_PRE above */ + tl_assert(bar->size > 0); + tl_assert(bar->waiting); + + VG_(addToXA)( bar->waiting, &thr ); + + /* guaranteed by this function */ + present = VG_(sizeXA)(bar->waiting); + tl_assert(present > 0 && present <= bar->size); + + if (present < bar->size) + return; + + /* All the threads have arrived. Now do the Interesting Bit. Get + a new synchronisation object and do a weak send to it from all + the participating threads. This makes its vector clocks be the + join of all the individual threads' vector clocks. Then do a + strong receive from it back to all threads, so that their VCs + are a copy of it (hence are all equal to the join of their + original VCs.) */ + so = libhb_so_alloc(); + + /* XXX check ->waiting has no duplicates */ + + tl_assert(bar->waiting); + tl_assert(VG_(sizeXA)(bar->waiting) == bar->size); + + /* compute the join ... */ + for (i = 0; i < bar->size; i++) { + Thread* t = *(Thread**)VG_(indexXA)(bar->waiting, i); + Thr* hbthr = t->hbthr; + libhb_so_send( hbthr, so, False/*weak send*/ ); + } + /* ... and distribute to all threads */ + for (i = 0; i < bar->size; i++) { + Thread* t = *(Thread**)VG_(indexXA)(bar->waiting, i); + Thr* hbthr = t->hbthr; + libhb_so_recv( hbthr, so, True/*strong recv*/ ); + } + + /* finally, we must empty out the waiting vector */ + VG_(dropTailXA)(bar->waiting, VG_(sizeXA)(bar->waiting)); + + /* and we don't need this any more. Perhaps a stack-allocated + SO would be better? */ + libhb_so_dealloc(so); +} + + +/*--------------------------------------------------------------*/ +/*--- Lock acquisition order monitoring ---*/ +/*--------------------------------------------------------------*/ + +/* FIXME: here are some optimisations still to do in + laog__pre_thread_acquires_lock. + + The graph is structured so that if L1 --*--> L2 then L1 must be + acquired before L2. + + The common case is that some thread T holds (eg) L1 L2 and L3 and + is repeatedly acquiring and releasing Ln, and there is no ordering + error in what it is doing. Hence it repeatly: + + (1) searches laog to see if Ln --*--> {L1,L2,L3}, which always + produces the answer No (because there is no error). + + (2) adds edges {L1,L2,L3} --> Ln to laog, which are already present + (because they already got added the first time T acquired Ln). + + Hence cache these two events: + + (1) Cache result of the query from last time. Invalidate the cache + any time any edges are added to or deleted from laog. + + (2) Cache these add-edge requests and ignore them if said edges + have already been added to laog. Invalidate the cache any time + any edges are deleted from laog. +*/ + +typedef + struct { + WordSetID inns; /* in univ_laog */ + WordSetID outs; /* in univ_laog */ + } + LAOGLinks; + +/* lock order acquisition graph */ +static WordFM* laog = NULL; /* WordFM Lock* LAOGLinks* */ + +/* EXPOSITION ONLY: for each edge in 'laog', record the two places + where that edge was created, so that we can show the user later if + we need to. */ +typedef + struct { + Addr src_ga; /* Lock guest addresses for */ + Addr dst_ga; /* src/dst of the edge */ + ExeContext* src_ec; /* And corresponding places where that */ + ExeContext* dst_ec; /* ordering was established */ + } + LAOGLinkExposition; + +static Word cmp_LAOGLinkExposition ( UWord llx1W, UWord llx2W ) { + /* Compare LAOGLinkExposition*s by (src_ga,dst_ga) field pair. */ + LAOGLinkExposition* llx1 = (LAOGLinkExposition*)llx1W; + LAOGLinkExposition* llx2 = (LAOGLinkExposition*)llx2W; + if (llx1->src_ga < llx2->src_ga) return -1; + if (llx1->src_ga > llx2->src_ga) return 1; + if (llx1->dst_ga < llx2->dst_ga) return -1; + if (llx1->dst_ga > llx2->dst_ga) return 1; + return 0; +} + +static WordFM* laog_exposition = NULL; /* WordFM LAOGLinkExposition* NULL */ +/* end EXPOSITION ONLY */ + + +__attribute__((noinline)) +static void laog__init ( void ) +{ + tl_assert(!laog); + tl_assert(!laog_exposition); + + laog = VG_(newFM)( HG_(zalloc), "hg.laog__init.1", + HG_(free), NULL/*unboxedcmp*/ ); + + laog_exposition = VG_(newFM)( HG_(zalloc), "hg.laog__init.2", HG_(free), + cmp_LAOGLinkExposition ); + tl_assert(laog); + tl_assert(laog_exposition); +} + +static void laog__show ( Char* who ) { + Word i, ws_size; + UWord* ws_words; + Lock* me; + LAOGLinks* links; + VG_(printf)("laog (requested by %s) {\n", who); + VG_(initIterFM)( laog ); + me = NULL; + links = NULL; + while (VG_(nextIterFM)( laog, (Word*)&me, + (Word*)&links )) { + tl_assert(me); + tl_assert(links); + VG_(printf)(" node %p:\n", me); + HG_(getPayloadWS)( &ws_words, &ws_size, univ_laog, links->inns ); + for (i = 0; i < ws_size; i++) + VG_(printf)(" inn %#lx\n", ws_words[i] ); + HG_(getPayloadWS)( &ws_words, &ws_size, univ_laog, links->outs ); + for (i = 0; i < ws_size; i++) + VG_(printf)(" out %#lx\n", ws_words[i] ); + me = NULL; + links = NULL; + } + VG_(doneIterFM)( laog ); + VG_(printf)("}\n"); +} + +__attribute__((noinline)) +static void laog__add_edge ( Lock* src, Lock* dst ) { + Word keyW; + LAOGLinks* links; + Bool presentF, presentR; + if (0) VG_(printf)("laog__add_edge %p %p\n", src, dst); + + /* Take the opportunity to sanity check the graph. Record in + presentF if there is already a src->dst mapping in this node's + forwards links, and presentR if there is already a src->dst + mapping in this node's backwards links. They should agree! + Also, we need to know whether the edge was already present so as + to decide whether or not to update the link details mapping. We + can compute presentF and presentR essentially for free, so may + as well do this always. */ + presentF = presentR = False; + + /* Update the out edges for src */ + keyW = 0; + links = NULL; + if (VG_(lookupFM)( laog, &keyW, (Word*)&links, (Word)src )) { + WordSetID outs_new; + tl_assert(links); + tl_assert(keyW == (Word)src); + outs_new = HG_(addToWS)( univ_laog, links->outs, (Word)dst ); + presentF = outs_new == links->outs; + links->outs = outs_new; + } else { + links = HG_(zalloc)("hg.lae.1", sizeof(LAOGLinks)); + links->inns = HG_(emptyWS)( univ_laog ); + links->outs = HG_(singletonWS)( univ_laog, (Word)dst ); + VG_(addToFM)( laog, (Word)src, (Word)links ); + } + /* Update the in edges for dst */ + keyW = 0; + links = NULL; + if (VG_(lookupFM)( laog, &keyW, (Word*)&links, (Word)dst )) { + WordSetID inns_new; + tl_assert(links); + tl_assert(keyW == (Word)dst); + inns_new = HG_(addToWS)( univ_laog, links->inns, (Word)src ); + presentR = inns_new == links->inns; + links->inns = inns_new; + } else { + links = HG_(zalloc)("hg.lae.2", sizeof(LAOGLinks)); + links->inns = HG_(singletonWS)( univ_laog, (Word)src ); + links->outs = HG_(emptyWS)( univ_laog ); + VG_(addToFM)( laog, (Word)dst, (Word)links ); + } + + tl_assert( (presentF && presentR) || (!presentF && !presentR) ); + + if (!presentF && src->acquired_at && dst->acquired_at) { + LAOGLinkExposition expo; + /* If this edge is entering the graph, and we have acquired_at + information for both src and dst, record those acquisition + points. Hence, if there is later a violation of this + ordering, we can show the user the two places in which the + required src-dst ordering was previously established. */ + if (0) VG_(printf)("acquire edge %#lx %#lx\n", + src->guestaddr, dst->guestaddr); + expo.src_ga = src->guestaddr; + expo.dst_ga = dst->guestaddr; + expo.src_ec = NULL; + expo.dst_ec = NULL; + tl_assert(laog_exposition); + if (VG_(lookupFM)( laog_exposition, NULL, NULL, (Word)&expo )) { + /* we already have it; do nothing */ + } else { + LAOGLinkExposition* expo2 = HG_(zalloc)("hg.lae.3", + sizeof(LAOGLinkExposition)); + expo2->src_ga = src->guestaddr; + expo2->dst_ga = dst->guestaddr; + expo2->src_ec = src->acquired_at; + expo2->dst_ec = dst->acquired_at; + VG_(addToFM)( laog_exposition, (Word)expo2, (Word)NULL ); + } + } +} + +__attribute__((noinline)) +static void laog__del_edge ( Lock* src, Lock* dst ) { + Word keyW; + LAOGLinks* links; + if (0) VG_(printf)("laog__del_edge %p %p\n", src, dst); + /* Update the out edges for src */ + keyW = 0; + links = NULL; + if (VG_(lookupFM)( laog, &keyW, (Word*)&links, (Word)src )) { + tl_assert(links); + tl_assert(keyW == (Word)src); + links->outs = HG_(delFromWS)( univ_laog, links->outs, (Word)dst ); + } + /* Update the in edges for dst */ + keyW = 0; + links = NULL; + if (VG_(lookupFM)( laog, &keyW, (Word*)&links, (Word)dst )) { + tl_assert(links); + tl_assert(keyW == (Word)dst); + links->inns = HG_(delFromWS)( univ_laog, links->inns, (Word)src ); + } +} + +__attribute__((noinline)) +static WordSetID /* in univ_laog */ laog__succs ( Lock* lk ) { + Word keyW; + LAOGLinks* links; + keyW = 0; + links = NULL; + if (VG_(lookupFM)( laog, &keyW, (Word*)&links, (Word)lk )) { + tl_assert(links); + tl_assert(keyW == (Word)lk); + return links->outs; + } else { + return HG_(emptyWS)( univ_laog ); + } +} + +__attribute__((noinline)) +static WordSetID /* in univ_laog */ laog__preds ( Lock* lk ) { + Word keyW; + LAOGLinks* links; + keyW = 0; + links = NULL; + if (VG_(lookupFM)( laog, &keyW, (Word*)&links, (Word)lk )) { + tl_assert(links); + tl_assert(keyW == (Word)lk); + return links->inns; + } else { + return HG_(emptyWS)( univ_laog ); + } +} + +__attribute__((noinline)) +static void laog__sanity_check ( Char* who ) { + Word i, ws_size; + UWord* ws_words; + Lock* me; + LAOGLinks* links; + if (UNLIKELY(!laog || !laog_exposition)) + laog__init(); + VG_(initIterFM)( laog ); + me = NULL; + links = NULL; + if (0) VG_(printf)("laog sanity check\n"); + while (VG_(nextIterFM)( laog, (Word*)&me, + (Word*)&links )) { + tl_assert(me); + tl_assert(links); + HG_(getPayloadWS)( &ws_words, &ws_size, univ_laog, links->inns ); + for (i = 0; i < ws_size; i++) { + if ( ! HG_(elemWS)( univ_laog, + laog__succs( (Lock*)ws_words[i] ), + (Word)me )) + goto bad; + } + HG_(getPayloadWS)( &ws_words, &ws_size, univ_laog, links->outs ); + for (i = 0; i < ws_size; i++) { + if ( ! HG_(elemWS)( univ_laog, + laog__preds( (Lock*)ws_words[i] ), + (Word)me )) + goto bad; + } + me = NULL; + links = NULL; + } + VG_(doneIterFM)( laog ); + return; + + bad: + VG_(printf)("laog__sanity_check(%s) FAILED\n", who); + laog__show(who); + tl_assert(0); +} + +/* If there is a path in laog from 'src' to any of the elements in + 'dst', return an arbitrarily chosen element of 'dst' reachable from + 'src'. If no path exist from 'src' to any element in 'dst', return + NULL. */ +__attribute__((noinline)) +static +Lock* laog__do_dfs_from_to ( Lock* src, WordSetID dsts /* univ_lsets */ ) +{ + Lock* ret; + Word i, ssz; + XArray* stack; /* of Lock* */ + WordFM* visited; /* Lock* -> void, iow, Set(Lock*) */ + Lock* here; + WordSetID succs; + Word succs_size; + UWord* succs_words; + //laog__sanity_check(); + + /* If the destination set is empty, we can never get there from + 'src' :-), so don't bother to try */ + if (HG_(isEmptyWS)( univ_lsets, dsts )) + return NULL; + + ret = NULL; + stack = VG_(newXA)( HG_(zalloc), "hg.lddft.1", HG_(free), sizeof(Lock*) ); + visited = VG_(newFM)( HG_(zalloc), "hg.lddft.2", HG_(free), NULL/*unboxedcmp*/ ); + + (void) VG_(addToXA)( stack, &src ); + + while (True) { + + ssz = VG_(sizeXA)( stack ); + + if (ssz == 0) { ret = NULL; break; } + + here = *(Lock**) VG_(indexXA)( stack, ssz-1 ); + VG_(dropTailXA)( stack, 1 ); + + if (HG_(elemWS)( univ_lsets, dsts, (Word)here )) { ret = here; break; } + + if (VG_(lookupFM)( visited, NULL, NULL, (Word)here )) + continue; + + VG_(addToFM)( visited, (Word)here, 0 ); + + succs = laog__succs( here ); + HG_(getPayloadWS)( &succs_words, &succs_size, univ_laog, succs ); + for (i = 0; i < succs_size; i++) + (void) VG_(addToXA)( stack, &succs_words[i] ); + } + + VG_(deleteFM)( visited, NULL, NULL ); + VG_(deleteXA)( stack ); + return ret; +} + + +/* Thread 'thr' is acquiring 'lk'. Check for inconsistent ordering + between 'lk' and the locks already held by 'thr' and issue a + complaint if so. Also, update the ordering graph appropriately. +*/ +__attribute__((noinline)) +static void laog__pre_thread_acquires_lock ( + Thread* thr, /* NB: BEFORE lock is added */ + Lock* lk + ) +{ + UWord* ls_words; + Word ls_size, i; + Lock* other; + + /* It may be that 'thr' already holds 'lk' and is recursively + relocking in. In this case we just ignore the call. */ + /* NB: univ_lsets really is correct here */ + if (HG_(elemWS)( univ_lsets, thr->locksetA, (Word)lk )) + return; + + if (UNLIKELY(!laog || !laog_exposition)) + laog__init(); + + /* First, the check. Complain if there is any path in laog from lk + to any of the locks already held by thr, since if any such path + existed, it would mean that previously lk was acquired before + (rather than after, as we are doing here) at least one of those + locks. + */ + other = laog__do_dfs_from_to(lk, thr->locksetA); + if (other) { + LAOGLinkExposition key, *found; + /* So we managed to find a path lk --*--> other in the graph, + which implies that 'lk' should have been acquired before + 'other' but is in fact being acquired afterwards. We present + the lk/other arguments to record_error_LockOrder in the order + in which they should have been acquired. */ + /* Go look in the laog_exposition mapping, to find the allocation + points for this edge, so we can show the user. */ + key.src_ga = lk->guestaddr; + key.dst_ga = other->guestaddr; + key.src_ec = NULL; + key.dst_ec = NULL; + found = NULL; + if (VG_(lookupFM)( laog_exposition, + (Word*)&found, NULL, (Word)&key )) { + tl_assert(found != &key); + tl_assert(found->src_ga == key.src_ga); + tl_assert(found->dst_ga == key.dst_ga); + tl_assert(found->src_ec); + tl_assert(found->dst_ec); + HG_(record_error_LockOrder)( + thr, lk->guestaddr, other->guestaddr, + found->src_ec, found->dst_ec ); + } else { + /* Hmm. This can't happen (can it?) */ + HG_(record_error_LockOrder)( + thr, lk->guestaddr, other->guestaddr, + NULL, NULL ); + } + } + + /* Second, add to laog the pairs + (old, lk) | old <- locks already held by thr + Since both old and lk are currently held by thr, their acquired_at + fields must be non-NULL. + */ + tl_assert(lk->acquired_at); + HG_(getPayloadWS)( &ls_words, &ls_size, univ_lsets, thr->locksetA ); + for (i = 0; i < ls_size; i++) { + Lock* old = (Lock*)ls_words[i]; + tl_assert(old->acquired_at); + laog__add_edge( old, lk ); + } + + /* Why "except_Locks" ? We're here because a lock is being + acquired by a thread, and we're in an inconsistent state here. + See the call points in evhH__post_thread_{r,w}_acquires_lock. + When called in this inconsistent state, locks__sanity_check duly + barfs. */ + if (HG_(clo_sanity_flags) & SCE_LAOG) + all_except_Locks__sanity_check("laog__pre_thread_acquires_lock-post"); +} + + +/* Delete from 'laog' any pair mentioning a lock in locksToDelete */ + +__attribute__((noinline)) +static void laog__handle_one_lock_deletion ( Lock* lk ) +{ + WordSetID preds, succs; + Word preds_size, succs_size, i, j; + UWord *preds_words, *succs_words; + + if (UNLIKELY(!laog || !laog_exposition)) + laog__init(); + + preds = laog__preds( lk ); + succs = laog__succs( lk ); + + HG_(getPayloadWS)( &preds_words, &preds_size, univ_laog, preds ); + for (i = 0; i < preds_size; i++) + laog__del_edge( (Lock*)preds_words[i], lk ); + + HG_(getPayloadWS)( &succs_words, &succs_size, univ_laog, succs ); + for (j = 0; j < succs_size; j++) + laog__del_edge( lk, (Lock*)succs_words[j] ); + + for (i = 0; i < preds_size; i++) { + for (j = 0; j < succs_size; j++) { + if (preds_words[i] != succs_words[j]) { + /* This can pass unlocked locks to laog__add_edge, since + we're deleting stuff. So their acquired_at fields may + be NULL. */ + laog__add_edge( (Lock*)preds_words[i], (Lock*)succs_words[j] ); + } + } + } +} + +//__attribute__((noinline)) +//static void laog__handle_lock_deletions ( +// WordSetID /* in univ_laog */ locksToDelete +// ) +//{ +// Word i, ws_size; +// UWord* ws_words; +// +// if (UNLIKELY(!laog || !laog_exposition)) +// laog__init(); +// +// HG_(getPayloadWS)( &ws_words, &ws_size, univ_lsets, locksToDelete ); +// for (i = 0; i < ws_size; i++) +// laog__handle_one_lock_deletion( (Lock*)ws_words[i] ); +// +// if (HG_(clo_sanity_flags) & SCE_LAOG) +// all__sanity_check("laog__handle_lock_deletions-post"); +//} + + +/*--------------------------------------------------------------*/ +/*--- Malloc/free replacements ---*/ +/*--------------------------------------------------------------*/ + +typedef + struct { + void* next; /* required by m_hashtable */ + Addr payload; /* ptr to actual block */ + SizeT szB; /* size requested */ + ExeContext* where; /* where it was allocated */ + Thread* thr; /* allocating thread */ + } + MallocMeta; + +/* A hash table of MallocMetas, used to track malloc'd blocks + (obviously). */ +static VgHashTable hg_mallocmeta_table = NULL; + + +static MallocMeta* new_MallocMeta ( void ) { + MallocMeta* md = HG_(zalloc)( "hg.new_MallocMeta.1", sizeof(MallocMeta) ); + tl_assert(md); + return md; +} +static void delete_MallocMeta ( MallocMeta* md ) { + HG_(free)(md); +} + + +/* Allocate a client block and set up the metadata for it. */ + +static +void* handle_alloc ( ThreadId tid, + SizeT szB, SizeT alignB, Bool is_zeroed ) +{ + Addr p; + MallocMeta* md; + + tl_assert( ((SSizeT)szB) >= 0 ); + p = (Addr)VG_(cli_malloc)(alignB, szB); + if (!p) { + return NULL; + } + if (is_zeroed) + VG_(memset)((void*)p, 0, szB); + + /* Note that map_threads_lookup must succeed (cannot assert), since + memory can only be allocated by currently alive threads, hence + they must have an entry in map_threads. */ + md = new_MallocMeta(); + md->payload = p; + md->szB = szB; + md->where = VG_(record_ExeContext)( tid, 0 ); + md->thr = map_threads_lookup( tid ); + + VG_(HT_add_node)( hg_mallocmeta_table, (VgHashNode*)md ); + + /* Tell the lower level memory wranglers. */ + evh__new_mem_heap( p, szB, is_zeroed ); + + return (void*)p; +} + +/* Re the checks for less-than-zero (also in hg_cli__realloc below): + Cast to a signed type to catch any unexpectedly negative args. + We're assuming here that the size asked for is not greater than + 2^31 bytes (for 32-bit platforms) or 2^63 bytes (for 64-bit + platforms). */ +static void* hg_cli__malloc ( ThreadId tid, SizeT n ) { + if (((SSizeT)n) < 0) return NULL; + return handle_alloc ( tid, n, VG_(clo_alignment), + /*is_zeroed*/False ); +} +static void* hg_cli____builtin_new ( ThreadId tid, SizeT n ) { + if (((SSizeT)n) < 0) return NULL; + return handle_alloc ( tid, n, VG_(clo_alignment), + /*is_zeroed*/False ); +} +static void* hg_cli____builtin_vec_new ( ThreadId tid, SizeT n ) { + if (((SSizeT)n) < 0) return NULL; + return handle_alloc ( tid, n, VG_(clo_alignment), + /*is_zeroed*/False ); +} +static void* hg_cli__memalign ( ThreadId tid, SizeT align, SizeT n ) { + if (((SSizeT)n) < 0) return NULL; + return handle_alloc ( tid, n, align, + /*is_zeroed*/False ); +} +static void* hg_cli__calloc ( ThreadId tid, SizeT nmemb, SizeT size1 ) { + if ( ((SSizeT)nmemb) < 0 || ((SSizeT)size1) < 0 ) return NULL; + return handle_alloc ( tid, nmemb*size1, VG_(clo_alignment), + /*is_zeroed*/True ); +} + + +/* Free a client block, including getting rid of the relevant + metadata. */ + +static void handle_free ( ThreadId tid, void* p ) +{ + MallocMeta *md, *old_md; + SizeT szB; + + /* First see if we can find the metadata for 'p'. */ + md = (MallocMeta*) VG_(HT_lookup)( hg_mallocmeta_table, (UWord)p ); + if (!md) + return; /* apparently freeing a bogus address. Oh well. */ + + tl_assert(md->payload == (Addr)p); + szB = md->szB; + + /* Nuke the metadata block */ + old_md = (MallocMeta*) + VG_(HT_remove)( hg_mallocmeta_table, (UWord)p ); + tl_assert(old_md); /* it must be present - we just found it */ + tl_assert(old_md == md); + tl_assert(old_md->payload == (Addr)p); + + VG_(cli_free)((void*)old_md->payload); + delete_MallocMeta(old_md); + + /* Tell the lower level memory wranglers. */ + evh__die_mem_heap( (Addr)p, szB ); +} + +static void hg_cli__free ( ThreadId tid, void* p ) { + handle_free(tid, p); +} +static void hg_cli____builtin_delete ( ThreadId tid, void* p ) { + handle_free(tid, p); +} +static void hg_cli____builtin_vec_delete ( ThreadId tid, void* p ) { + handle_free(tid, p); +} + + +static void* hg_cli__realloc ( ThreadId tid, void* payloadV, SizeT new_size ) +{ + MallocMeta *md, *md_new, *md_tmp; + SizeT i; + + Addr payload = (Addr)payloadV; + + if (((SSizeT)new_size) < 0) return NULL; + + md = (MallocMeta*) VG_(HT_lookup)( hg_mallocmeta_table, (UWord)payload ); + if (!md) + return NULL; /* apparently realloc-ing a bogus address. Oh well. */ + + tl_assert(md->payload == payload); + + if (md->szB == new_size) { + /* size unchanged */ + md->where = VG_(record_ExeContext)(tid, 0); + return payloadV; + } + + if (md->szB > new_size) { + /* new size is smaller */ + md->szB = new_size; + md->where = VG_(record_ExeContext)(tid, 0); + evh__die_mem_heap( md->payload + new_size, md->szB - new_size ); + return payloadV; + } + + /* else */ { + /* new size is bigger */ + Addr p_new = (Addr)VG_(cli_malloc)(VG_(clo_alignment), new_size); + + /* First half kept and copied, second half new */ + // FIXME: shouldn't we use a copier which implements the + // memory state machine? + shadow_mem_copy_range( payload, p_new, md->szB ); + evh__new_mem_heap ( p_new + md->szB, new_size - md->szB, + /*inited*/False ); + /* FIXME: can anything funny happen here? specifically, if the + old range contained a lock, then die_mem_heap will complain. + Is that the correct behaviour? Not sure. */ + evh__die_mem_heap( payload, md->szB ); + + /* Copy from old to new */ + for (i = 0; i < md->szB; i++) + ((UChar*)p_new)[i] = ((UChar*)payload)[i]; + + /* Because the metadata hash table is index by payload address, + we have to get rid of the old hash table entry and make a new + one. We can't just modify the existing metadata in place, + because then it would (almost certainly) be in the wrong hash + chain. */ + md_new = new_MallocMeta(); + *md_new = *md; + + md_tmp = VG_(HT_remove)( hg_mallocmeta_table, payload ); + tl_assert(md_tmp); + tl_assert(md_tmp == md); + + VG_(cli_free)((void*)md->payload); + delete_MallocMeta(md); + + /* Update fields */ + md_new->where = VG_(record_ExeContext)( tid, 0 ); + md_new->szB = new_size; + md_new->payload = p_new; + md_new->thr = map_threads_lookup( tid ); + + /* and add */ + VG_(HT_add_node)( hg_mallocmeta_table, (VgHashNode*)md_new ); + + return (void*)p_new; + } +} + +static SizeT hg_cli_malloc_usable_size ( ThreadId tid, void* p ) +{ + MallocMeta *md = VG_(HT_lookup)( hg_mallocmeta_table, (UWord)p ); + + // There may be slop, but pretend there isn't because only the asked-for + // area will have been shadowed properly. + return ( md ? md->szB : 0 ); +} + + +/*--------------------------------------------------------------*/ +/*--- Instrumentation ---*/ +/*--------------------------------------------------------------*/ + +static void instrument_mem_access ( IRSB* bbOut, + IRExpr* addr, + Int szB, + Bool isStore, + Int hWordTy_szB ) +{ + IRType tyAddr = Ity_INVALID; + HChar* hName = NULL; + void* hAddr = NULL; + Int regparms = 0; + IRExpr** argv = NULL; + IRDirty* di = NULL; + + tl_assert(isIRAtom(addr)); + tl_assert(hWordTy_szB == 4 || hWordTy_szB == 8); + + tyAddr = typeOfIRExpr( bbOut->tyenv, addr ); + tl_assert(tyAddr == Ity_I32 || tyAddr == Ity_I64); + + /* So the effective address is in 'addr' now. */ + regparms = 1; // unless stated otherwise + if (isStore) { + switch (szB) { + case 1: + hName = "evh__mem_help_write_1"; + hAddr = &evh__mem_help_write_1; + argv = mkIRExprVec_1( addr ); + break; + case 2: + hName = "evh__mem_help_write_2"; + hAddr = &evh__mem_help_write_2; + argv = mkIRExprVec_1( addr ); + break; + case 4: + hName = "evh__mem_help_write_4"; + hAddr = &evh__mem_help_write_4; + argv = mkIRExprVec_1( addr ); + break; + case 8: + hName = "evh__mem_help_write_8"; + hAddr = &evh__mem_help_write_8; + argv = mkIRExprVec_1( addr ); + break; + default: + tl_assert(szB > 8 && szB <= 512); /* stay sane */ + regparms = 2; + hName = "evh__mem_help_write_N"; + hAddr = &evh__mem_help_write_N; + argv = mkIRExprVec_2( addr, mkIRExpr_HWord( szB )); + break; + } + } else { + switch (szB) { + case 1: + hName = "evh__mem_help_read_1"; + hAddr = &evh__mem_help_read_1; + argv = mkIRExprVec_1( addr ); + break; + case 2: + hName = "evh__mem_help_read_2"; + hAddr = &evh__mem_help_read_2; + argv = mkIRExprVec_1( addr ); + break; + case 4: + hName = "evh__mem_help_read_4"; + hAddr = &evh__mem_help_read_4; + argv = mkIRExprVec_1( addr ); + break; + case 8: + hName = "evh__mem_help_read_8"; + hAddr = &evh__mem_help_read_8; + argv = mkIRExprVec_1( addr ); + break; + default: + tl_assert(szB > 8 && szB <= 512); /* stay sane */ + regparms = 2; + hName = "evh__mem_help_read_N"; + hAddr = &evh__mem_help_read_N; + argv = mkIRExprVec_2( addr, mkIRExpr_HWord( szB )); + break; + } + } + + /* Add the helper. */ + tl_assert(hName); + tl_assert(hAddr); + tl_assert(argv); + di = unsafeIRDirty_0_N( regparms, + hName, VG_(fnptr_to_fnentry)( hAddr ), + argv ); + addStmtToIRSB( bbOut, IRStmt_Dirty(di) ); +} + + +//static void instrument_memory_bus_event ( IRSB* bbOut, IRMBusEvent event ) +//{ +// switch (event) { +// case Imbe_SnoopedStoreBegin: +// case Imbe_SnoopedStoreEnd: +// /* These arise from ppc stwcx. insns. They should perhaps be +// handled better. */ +// break; +// case Imbe_Fence: +// break; /* not interesting */ +// case Imbe_BusLock: +// case Imbe_BusUnlock: +// addStmtToIRSB( +// bbOut, +// IRStmt_Dirty( +// unsafeIRDirty_0_N( +// 0/*regparms*/, +// event == Imbe_BusLock ? "evh__bus_lock" +// : "evh__bus_unlock", +// VG_(fnptr_to_fnentry)( +// event == Imbe_BusLock ? &evh__bus_lock +// : &evh__bus_unlock +// ), +// mkIRExprVec_0() +// ) +// ) +// ); +// break; +// default: +// tl_assert(0); +// } +//} + + +static +IRSB* hg_instrument ( VgCallbackClosure* closure, + IRSB* bbIn, + VexGuestLayout* layout, + VexGuestExtents* vge, + IRType gWordTy, IRType hWordTy ) +{ + Int i; + IRSB* bbOut; + Bool x86busLocked = False; + Bool isSnoopedStore = False; + + if (gWordTy != hWordTy) { + /* We don't currently support this case. */ + VG_(tool_panic)("host/guest word size mismatch"); + } + + /* Set up BB */ + bbOut = emptyIRSB(); + bbOut->tyenv = deepCopyIRTypeEnv(bbIn->tyenv); + bbOut->next = deepCopyIRExpr(bbIn->next); + bbOut->jumpkind = bbIn->jumpkind; + + // Copy verbatim any IR preamble preceding the first IMark + i = 0; + while (i < bbIn->stmts_used && bbIn->stmts[i]->tag != Ist_IMark) { + addStmtToIRSB( bbOut, bbIn->stmts[i] ); + i++; + } + + for (/*use current i*/; i < bbIn->stmts_used; i++) { + IRStmt* st = bbIn->stmts[i]; + tl_assert(st); + tl_assert(isFlatIRStmt(st)); + switch (st->tag) { + case Ist_NoOp: + case Ist_AbiHint: + case Ist_Put: + case Ist_PutI: + case Ist_IMark: + case Ist_Exit: + /* None of these can contain any memory references. */ + break; + + case Ist_MBE: + //instrument_memory_bus_event( bbOut, st->Ist.MBE.event ); + switch (st->Ist.MBE.event) { + case Imbe_Fence: + break; /* not interesting */ + /* Imbe_Bus{Lock,Unlock} arise from x86/amd64 LOCK + prefixed instructions. */ + case Imbe_BusLock: + tl_assert(x86busLocked == False); + x86busLocked = True; + break; + case Imbe_BusUnlock: + tl_assert(x86busLocked == True); + x86busLocked = False; + break; + /* Imbe_SnoopedStore{Begin,End} arise from ppc + stwcx. instructions. */ + case Imbe_SnoopedStoreBegin: + tl_assert(isSnoopedStore == False); + isSnoopedStore = True; + break; + case Imbe_SnoopedStoreEnd: + tl_assert(isSnoopedStore == True); + isSnoopedStore = False; + break; + default: + goto unhandled; + } + break; + + case Ist_Store: + if (!x86busLocked && !isSnoopedStore) + instrument_mem_access( + bbOut, + st->Ist.Store.addr, + sizeofIRType(typeOfIRExpr(bbIn->tyenv, st->Ist.Store.data)), + True/*isStore*/, + sizeofIRType(hWordTy) + ); + break; + + case Ist_WrTmp: { + IRExpr* data = st->Ist.WrTmp.data; + if (data->tag == Iex_Load) { + instrument_mem_access( + bbOut, + data->Iex.Load.addr, + sizeofIRType(data->Iex.Load.ty), + False/*!isStore*/, + sizeofIRType(hWordTy) + ); + } + break; + } + + case Ist_Dirty: { + Int dataSize; + IRDirty* d = st->Ist.Dirty.details; + if (d->mFx != Ifx_None) { + /* This dirty helper accesses memory. Collect the + details. */ + tl_assert(d->mAddr != NULL); + tl_assert(d->mSize != 0); + dataSize = d->mSize; + if (d->mFx == Ifx_Read || d->mFx == Ifx_Modify) { + instrument_mem_access( + bbOut, d->mAddr, dataSize, False/*!isStore*/, + sizeofIRType(hWordTy) + ); + } + /* This isn't really correct. Really the + instrumentation should be only added when + (!x86busLocked && !isSnoopedStore), just like with + Ist_Store. Still, I don't think this is + particularly important. */ + if (d->mFx == Ifx_Write || d->mFx == Ifx_Modify) { + instrument_mem_access( + bbOut, d->mAddr, dataSize, True/*isStore*/, + sizeofIRType(hWordTy) + ); + } + } else { + tl_assert(d->mAddr == NULL); + tl_assert(d->mSize == 0); + } + break; + } + + default: + unhandled: + ppIRStmt(st); + tl_assert(0); + + } /* switch (st->tag) */ + + addStmtToIRSB( bbOut, st ); + } /* iterate over bbIn->stmts */ + + return bbOut; +} + + +/*----------------------------------------------------------------*/ +/*--- Client requests ---*/ +/*----------------------------------------------------------------*/ + +/* Sheesh. Yet another goddam finite map. */ +static WordFM* map_pthread_t_to_Thread = NULL; /* pthread_t -> Thread* */ + +static void map_pthread_t_to_Thread_INIT ( void ) { + if (UNLIKELY(map_pthread_t_to_Thread == NULL)) { + map_pthread_t_to_Thread = VG_(newFM)( HG_(zalloc), "hg.mpttT.1", + HG_(free), NULL ); + tl_assert(map_pthread_t_to_Thread != NULL); + } +} + + +static +Bool hg_handle_client_request ( ThreadId tid, UWord* args, UWord* ret) +{ + if (!VG_IS_TOOL_USERREQ('H','G',args[0])) + return False; + + /* Anything that gets past the above check is one of ours, so we + should be able to handle it. */ + + /* default, meaningless return value, unless otherwise set */ + *ret = 0; + + switch (args[0]) { + + /* --- --- User-visible client requests --- --- */ + + case VG_USERREQ__HG_CLEAN_MEMORY: + if (0) VG_(printf)("VG_USERREQ__HG_CLEAN_MEMORY(%#lx,%ld)\n", + args[1], args[2]); + /* Call die_mem to (expensively) tidy up properly, if there + are any held locks etc in the area. Calling evh__die_mem + and then evh__new_mem is a bit inefficient; probably just + the latter would do. */ + if (args[2] > 0) { /* length */ + evh__die_mem(args[1], args[2]); + /* and then set it to New */ + evh__new_mem(args[1], args[2]); + } + break; + + /* --- --- Client requests for Helgrind's use only --- --- */ + + /* Some thread is telling us its pthread_t value. Record the + binding between that and the associated Thread*, so we can + later find the Thread* again when notified of a join by the + thread. */ + case _VG_USERREQ__HG_SET_MY_PTHREAD_T: { + Thread* my_thr = NULL; + if (0) + VG_(printf)("SET_MY_PTHREAD_T (tid %d): pthread_t = %p\n", (Int)tid, + (void*)args[1]); + map_pthread_t_to_Thread_INIT(); + my_thr = map_threads_maybe_lookup( tid ); + /* This assertion should hold because the map_threads (tid to + Thread*) binding should have been made at the point of + low-level creation of this thread, which should have + happened prior to us getting this client request for it. + That's because this client request is sent from + client-world from the 'thread_wrapper' function, which + only runs once the thread has been low-level created. */ + tl_assert(my_thr != NULL); + /* So now we know that (pthread_t)args[1] is associated with + (Thread*)my_thr. Note that down. */ + if (0) + VG_(printf)("XXXX: bind pthread_t %p to Thread* %p\n", + (void*)args[1], (void*)my_thr ); + VG_(addToFM)( map_pthread_t_to_Thread, (Word)args[1], (Word)my_thr ); + break; + } + + case _VG_USERREQ__HG_PTH_API_ERROR: { + Thread* my_thr = NULL; + map_pthread_t_to_Thread_INIT(); + my_thr = map_threads_maybe_lookup( tid ); + tl_assert(my_thr); /* See justification above in SET_MY_PTHREAD_T */ + HG_(record_error_PthAPIerror)( + my_thr, (HChar*)args[1], (Word)args[2], (HChar*)args[3] ); + break; + } + + /* This thread (tid) has completed a join with the quitting + thread whose pthread_t is in args[1]. */ + case _VG_USERREQ__HG_PTHREAD_JOIN_POST: { + Thread* thr_q = NULL; /* quitter Thread* */ + Bool found = False; + if (0) + VG_(printf)("NOTIFY_JOIN_COMPLETE (tid %d): quitter = %p\n", (Int)tid, + (void*)args[1]); + map_pthread_t_to_Thread_INIT(); + found = VG_(lookupFM)( map_pthread_t_to_Thread, + NULL, (Word*)&thr_q, (Word)args[1] ); + /* Can this fail? It would mean that our pthread_join + wrapper observed a successful join on args[1] yet that + thread never existed (or at least, it never lodged an + entry in the mapping (via SET_MY_PTHREAD_T)). Which + sounds like a bug in the threads library. */ + // FIXME: get rid of this assertion; handle properly + tl_assert(found); + if (found) { + if (0) + VG_(printf)(".................... quitter Thread* = %p\n", + thr_q); + evh__HG_PTHREAD_JOIN_POST( tid, thr_q ); + } + break; + } + + /* EXPOSITION only: by intercepting lock init events we can show + the user where the lock was initialised, rather than only + being able to show where it was first locked. Intercepting + lock initialisations is not necessary for the basic operation + of the race checker. */ + case _VG_USERREQ__HG_PTHREAD_MUTEX_INIT_POST: + evh__HG_PTHREAD_MUTEX_INIT_POST( tid, (void*)args[1], args[2] ); + break; + + case _VG_USERREQ__HG_PTHREAD_MUTEX_DESTROY_PRE: + evh__HG_PTHREAD_MUTEX_DESTROY_PRE( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_PRE: // pth_mx_t* + evh__HG_PTHREAD_MUTEX_UNLOCK_PRE( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_POST: // pth_mx_t* + evh__HG_PTHREAD_MUTEX_UNLOCK_POST( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE: // pth_mx_t*, Word + evh__HG_PTHREAD_MUTEX_LOCK_PRE( tid, (void*)args[1], args[2] ); + break; + + case _VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST: // pth_mx_t* + evh__HG_PTHREAD_MUTEX_LOCK_POST( tid, (void*)args[1] ); + break; + + /* This thread is about to do pthread_cond_signal on the + pthread_cond_t* in arg[1]. Ditto pthread_cond_broadcast. */ + case _VG_USERREQ__HG_PTHREAD_COND_SIGNAL_PRE: + case _VG_USERREQ__HG_PTHREAD_COND_BROADCAST_PRE: + evh__HG_PTHREAD_COND_SIGNAL_PRE( tid, (void*)args[1] ); + break; + + /* Entry into pthread_cond_wait, cond=arg[1], mutex=arg[2]. + Returns a flag indicating whether or not the mutex is believed to be + valid for this operation. */ + case _VG_USERREQ__HG_PTHREAD_COND_WAIT_PRE: { + Bool mutex_is_valid + = evh__HG_PTHREAD_COND_WAIT_PRE( tid, (void*)args[1], + (void*)args[2] ); + *ret = mutex_is_valid ? 1 : 0; + break; + } + + /* cond=arg[1] */ + case _VG_USERREQ__HG_PTHREAD_COND_DESTROY_PRE: + evh__HG_PTHREAD_COND_DESTROY_PRE( tid, (void*)args[1] ); + break; + + /* Thread successfully completed pthread_cond_wait, cond=arg[1], + mutex=arg[2] */ + case _VG_USERREQ__HG_PTHREAD_COND_WAIT_POST: + evh__HG_PTHREAD_COND_WAIT_POST( tid, + (void*)args[1], (void*)args[2] ); + break; + + case _VG_USERREQ__HG_PTHREAD_RWLOCK_INIT_POST: + evh__HG_PTHREAD_RWLOCK_INIT_POST( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_PTHREAD_RWLOCK_DESTROY_PRE: + evh__HG_PTHREAD_RWLOCK_DESTROY_PRE( tid, (void*)args[1] ); + break; + + /* rwlock=arg[1], isW=arg[2], isTryLock=arg[3] */ + case _VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE: + evh__HG_PTHREAD_RWLOCK_LOCK_PRE( tid, (void*)args[1], + args[2], args[3] ); + break; + + /* rwlock=arg[1], isW=arg[2] */ + case _VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST: + evh__HG_PTHREAD_RWLOCK_LOCK_POST( tid, (void*)args[1], args[2] ); + break; + + case _VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_PRE: + evh__HG_PTHREAD_RWLOCK_UNLOCK_PRE( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_POST: + evh__HG_PTHREAD_RWLOCK_UNLOCK_POST( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_POSIX_SEM_INIT_POST: /* sem_t*, unsigned long */ + evh__HG_POSIX_SEM_INIT_POST( tid, (void*)args[1], args[2] ); + break; + + case _VG_USERREQ__HG_POSIX_SEM_DESTROY_PRE: /* sem_t* */ + evh__HG_POSIX_SEM_DESTROY_PRE( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_POSIX_SEM_POST_PRE: /* sem_t* */ + evh__HG_POSIX_SEM_POST_PRE( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_POSIX_SEM_WAIT_POST: /* sem_t* */ + evh__HG_POSIX_SEM_WAIT_POST( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_PTHREAD_BARRIER_INIT_PRE: + /* pth_bar_t*, ulong */ + evh__HG_PTHREAD_BARRIER_INIT_PRE( tid, (void*)args[1], args[2] ); + break; + + case _VG_USERREQ__HG_PTHREAD_BARRIER_WAIT_PRE: + /* pth_bar_t* */ + evh__HG_PTHREAD_BARRIER_WAIT_PRE( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_PTHREAD_BARRIER_DESTROY_PRE: + /* pth_bar_t* */ + evh__HG_PTHREAD_BARRIER_DESTROY_PRE( tid, (void*)args[1] ); + break; + + default: + /* Unhandled Helgrind client request! */ + tl_assert2(0, "unhandled Helgrind client request 0x%lx", + args[0]); + } + + return True; +} + + +/*----------------------------------------------------------------*/ +/*--- Setup ---*/ +/*----------------------------------------------------------------*/ + +static Bool hg_process_cmd_line_option ( Char* arg ) +{ + Char* tmp_str; + + if VG_BOOL_CLO(arg, "--track-lockorders", + HG_(clo_track_lockorders)) {} + else if VG_BOOL_CLO(arg, "--cmp-race-err-addrs", + HG_(clo_cmp_race_err_addrs)) {} + else if VG_BOOL_CLO(arg, "--show-conflicts", + HG_(clo_show_conflicts)) {} + + /* If you change the 10k/10mill limits, remember to also change + them in assertions at the top of event_map_maybe_GC. */ + else if VG_BINT_CLO(arg, "--conflict-cache-size", + HG_(clo_conflict_cache_size), 10*1000, 10*1000*1000) {} + + /* "stuvwx" --> stuvwx (binary) */ + else if VG_STR_CLO(arg, "--hg-sanity-flags", tmp_str) { + Int j; + + if (6 != VG_(strlen)(tmp_str)) { + VG_(message)(Vg_UserMsg, + "--hg-sanity-flags argument must have 6 digits"); + return False; + } + for (j = 0; j < 6; j++) { + if ('0' == tmp_str[j]) { /* do nothing */ } + else if ('1' == tmp_str[j]) HG_(clo_sanity_flags) |= (1 << (6-1-j)); + else { + VG_(message)(Vg_UserMsg, "--hg-sanity-flags argument can " + "only contain 0s and 1s"); + return False; + } + } + if (0) VG_(printf)("XXX sanity flags: 0x%lx\n", HG_(clo_sanity_flags)); + } + + else + return VG_(replacement_malloc_process_cmd_line_option)(arg); + + return True; +} + +static void hg_print_usage ( void ) +{ + VG_(printf)( +" --track-lockorders=no|yes show lock ordering errors? [yes]\n" +" --show-conflicts=no|yes show both stack traces in a race? [yes]\n" +" --conflict-cache-size=N size of conflict history cache [1000000]\n" + ); + VG_(replacement_malloc_print_usage)(); +} + +static void hg_print_debug_usage ( void ) +{ + VG_(replacement_malloc_print_debug_usage)(); + VG_(printf)(" --cmp-race-err-addrs=no|yes are data addresses in " + "race errors significant? [no]\n"); + VG_(printf)(" --hg-sanity-flags=<XXXXXX> sanity check " + " at events (X = 0|1) [000000]\n"); + VG_(printf)(" --hg-sanity-flags values:\n"); + VG_(printf)(" 010000 after changes to " + "lock-order-acquisition-graph\n"); + VG_(printf)(" 001000 at memory accesses (NB: not currently used)\n"); + VG_(printf)(" 000100 at mem permission setting for " + "ranges >= %d bytes\n", SCE_BIGRANGE_T); + VG_(printf)(" 000010 at lock/unlock events\n"); + VG_(printf)(" 000001 at thread create/join events\n"); +} + +static void hg_post_clo_init ( void ) +{ +} + +static void hg_fini ( Int exitcode ) +{ + if (SHOW_DATA_STRUCTURES) + pp_everything( PP_ALL, "SK_(fini)" ); + if (HG_(clo_sanity_flags)) + all__sanity_check("SK_(fini)"); + + if (VG_(clo_verbosity) >= 2) { + + if (1) { + VG_(printf)("\n"); + HG_(ppWSUstats)( univ_tsets, "univ_tsets" ); + VG_(printf)("\n"); + HG_(ppWSUstats)( univ_lsets, "univ_lsets" ); + VG_(printf)("\n"); + HG_(ppWSUstats)( univ_laog, "univ_laog" ); + } + + //zz VG_(printf)("\n"); + //zz VG_(printf)(" hbefore: %'10lu queries\n", stats__hbefore_queries); + //zz VG_(printf)(" hbefore: %'10lu cache 0 hits\n", stats__hbefore_cache0s); + //zz VG_(printf)(" hbefore: %'10lu cache > 0 hits\n", stats__hbefore_cacheNs); + //zz VG_(printf)(" hbefore: %'10lu graph searches\n", stats__hbefore_gsearches); + //zz VG_(printf)(" hbefore: %'10lu of which slow\n", + //zz stats__hbefore_gsearches - stats__hbefore_gsearchFs); + //zz VG_(printf)(" hbefore: %'10lu stack high water mark\n", + //zz stats__hbefore_stk_hwm); + //zz VG_(printf)(" hbefore: %'10lu cache invals\n", stats__hbefore_invals); + //zz VG_(printf)(" hbefore: %'10lu probes\n", stats__hbefore_probes); + + VG_(printf)("\n"); + VG_(printf)(" locksets: %'8d unique lock sets\n", + (Int)HG_(cardinalityWSU)( univ_lsets )); + VG_(printf)(" threadsets: %'8d unique thread sets\n", + (Int)HG_(cardinalityWSU)( univ_tsets )); + VG_(printf)(" univ_laog: %'8d unique lock sets\n", + (Int)HG_(cardinalityWSU)( univ_laog )); + + //VG_(printf)("L(ast)L(ock) map: %'8lu inserts (%d map size)\n", + // stats__ga_LL_adds, + // (Int)(ga_to_lastlock ? VG_(sizeFM)( ga_to_lastlock ) : 0) ); + + VG_(printf)(" LockN-to-P map: %'8llu queries (%llu map size)\n", + HG_(stats__LockN_to_P_queries), + HG_(stats__LockN_to_P_get_map_size)() ); + + VG_(printf)("string table map: %'8llu queries (%llu map size)\n", + HG_(stats__string_table_queries), + HG_(stats__string_table_get_map_size)() ); + VG_(printf)(" LAOG: %'8d map size\n", + (Int)(laog ? VG_(sizeFM)( laog ) : 0)); + VG_(printf)(" LAOG exposition: %'8d map size\n", + (Int)(laog_exposition ? VG_(sizeFM)( laog_exposition ) : 0)); + VG_(printf)(" locks: %'8lu acquires, " + "%'lu releases\n", + stats__lockN_acquires, + stats__lockN_releases + ); + VG_(printf)(" sanity checks: %'8lu\n", stats__sanity_checks); + + VG_(printf)("\n"); + libhb_shutdown(True); + } +} + +/* FIXME: move these somewhere sane */ + +static +void for_libhb__get_stacktrace ( Thr* hbt, Addr* frames, UWord nRequest ) +{ + Thread* thr; + ThreadId tid; + UWord nActual; + tl_assert(hbt); + thr = libhb_get_Thr_opaque( hbt ); + tl_assert(thr); + tid = map_threads_maybe_reverse_lookup_SLOW(thr); + nActual = (UWord)VG_(get_StackTrace)( tid, frames, (UInt)nRequest, + NULL, NULL, 0 ); + tl_assert(nActual <= nRequest); + for (; nActual < nRequest; nActual++) + frames[nActual] = 0; +} + +static +ExeContext* for_libhb__get_EC ( Thr* hbt ) +{ + Thread* thr; + ThreadId tid; + ExeContext* ec; + tl_assert(hbt); + thr = libhb_get_Thr_opaque( hbt ); + tl_assert(thr); + tid = map_threads_maybe_reverse_lookup_SLOW(thr); + ec = VG_(record_ExeContext)( tid, 0 ); + return ec; +} + + +static void hg_pre_clo_init ( void ) +{ + Thr* hbthr_root; + VG_(details_name) ("Helgrind"); + VG_(details_version) (NULL); + VG_(details_description) ("a thread error detector"); + VG_(details_copyright_author)( + "Copyright (C) 2007-2009, and GNU GPL'd, by OpenWorks LLP et al."); + VG_(details_bug_reports_to) (VG_BUGS_TO); + VG_(details_avg_translation_sizeB) ( 200 ); + + VG_(basic_tool_funcs) (hg_post_clo_init, + hg_instrument, + hg_fini); + + VG_(needs_core_errors) (); + VG_(needs_tool_errors) (HG_(eq_Error), + HG_(pp_Error), + False,/*show TIDs for errors*/ + HG_(update_extra), + HG_(recognised_suppression), + HG_(read_extra_suppression_info), + HG_(error_matches_suppression), + HG_(get_error_name), + HG_(print_extra_suppression_info)); + + VG_(needs_command_line_options)(hg_process_cmd_line_option, + hg_print_usage, + hg_print_debug_usage); + VG_(needs_client_requests) (hg_handle_client_request); + + // FIXME? + //VG_(needs_sanity_checks) (hg_cheap_sanity_check, + // hg_expensive_sanity_check); + + VG_(needs_malloc_replacement) (hg_cli__malloc, + hg_cli____builtin_new, + hg_cli____builtin_vec_new, + hg_cli__memalign, + hg_cli__calloc, + hg_cli__free, + hg_cli____builtin_delete, + hg_cli____builtin_vec_delete, + hg_cli__realloc, + hg_cli_malloc_usable_size, + HG_CLI__MALLOC_REDZONE_SZB ); + + /* 21 Dec 08: disabled this; it mostly causes H to start more + slowly and use significantly more memory, without very often + providing useful results. The user can request to load this + information manually with --read-var-info=yes. */ + if (0) VG_(needs_var_info)(); /* optional */ + + VG_(track_new_mem_startup) ( evh__new_mem_w_perms ); + VG_(track_new_mem_stack_signal)( evh__new_mem_w_tid ); + VG_(track_new_mem_brk) ( evh__new_mem_w_tid ); + VG_(track_new_mem_mmap) ( evh__new_mem_w_perms ); + VG_(track_new_mem_stack) ( evh__new_mem ); + + // FIXME: surely this isn't thread-aware + VG_(track_copy_mem_remap) ( shadow_mem_copy_range ); + + VG_(track_change_mem_mprotect) ( evh__set_perms ); + + VG_(track_die_mem_stack_signal)( evh__die_mem ); + VG_(track_die_mem_brk) ( evh__die_mem ); + VG_(track_die_mem_munmap) ( evh__die_mem ); + VG_(track_die_mem_stack) ( evh__die_mem ); + + // FIXME: what is this for? + VG_(track_ban_mem_stack) (NULL); + + VG_(track_pre_mem_read) ( evh__pre_mem_read ); + VG_(track_pre_mem_read_asciiz) ( evh__pre_mem_read_asciiz ); + VG_(track_pre_mem_write) ( evh__pre_mem_write ); + VG_(track_post_mem_write) (NULL); + + ///////////////// + + VG_(track_pre_thread_ll_create)( evh__pre_thread_ll_create ); + VG_(track_pre_thread_ll_exit) ( evh__pre_thread_ll_exit ); + + VG_(track_start_client_code)( evh__start_client_code ); + VG_(track_stop_client_code)( evh__stop_client_code ); + + ///////////////////////////////////////////// + hbthr_root = libhb_init( for_libhb__get_stacktrace, + for_libhb__get_EC ); + ///////////////////////////////////////////// + + initialise_data_structures(hbthr_root); + + /* Ensure that requirements for "dodgy C-as-C++ style inheritance" + as described in comments at the top of pub_tool_hashtable.h, are + met. Blargh. */ + tl_assert( sizeof(void*) == sizeof(struct _MallocMeta*) ); + tl_assert( sizeof(UWord) == sizeof(Addr) ); + hg_mallocmeta_table + = VG_(HT_construct)( "hg_malloc_metadata_table" ); + +} + +VG_DETERMINE_INTERFACE_VERSION(hg_pre_clo_init) + +/*--------------------------------------------------------------------*/ +/*--- end hg_main.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/.svn/text-base/hg_wordset.c.svn-base b/helgrind/.svn/text-base/hg_wordset.c.svn-base new file mode 100644 index 0000000..5d33004 --- /dev/null +++ b/helgrind/.svn/text-base/hg_wordset.c.svn-base @@ -0,0 +1,860 @@ + +/*--------------------------------------------------------------------*/ +/*--- Sets of words, with unique set identifiers. ---*/ +/*--- hg_wordset.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks LLP + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. + + Neither the names of the U.S. Department of Energy nor the + University of California nor the names of its contributors may be + used to endorse or promote products derived from this software + without prior written permission. +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_libcassert.h" +#include "pub_tool_libcbase.h" +#include "pub_tool_libcprint.h" +#include "pub_tool_threadstate.h" +#include "pub_tool_wordfm.h" + +#include "hg_basics.h" +#include "hg_wordset.h" /* self */ + +//------------------------------------------------------------------// +//--- Word Cache ---// +//------------------------------------------------------------------// + +typedef + struct { UWord arg1; UWord arg2; UWord res; } + WCacheEnt; + +/* Each cache is a fixed sized array of N_WCACHE_STAT_MAX entries. + However only the first .dynMax are used. This is because at some + point, expanding the cache further overall gives a slowdown because + searching more entries more than negates any performance advantage + from caching those entries in the first place. Hence use .dynMax + to allow the size of the cache(s) to be set differently for each + different WordSetU. */ +#define N_WCACHE_STAT_MAX 32 +typedef + struct { + WCacheEnt ent[N_WCACHE_STAT_MAX]; + UWord dynMax; /* 1 .. N_WCACHE_STAT_MAX inclusive */ + UWord inUse; /* 0 .. dynMax inclusive */ + } + WCache; + +#define WCache_INIT(_zzcache,_zzdynmax) \ + do { \ + tl_assert((_zzdynmax) >= 1); \ + tl_assert((_zzdynmax) <= N_WCACHE_STAT_MAX); \ + (_zzcache).dynMax = (_zzdynmax); \ + (_zzcache).inUse = 0; \ + } while (0) + +#define WCache_LOOKUP_AND_RETURN(_retty,_zzcache,_zzarg1,_zzarg2) \ + do { \ + UWord _i; \ + UWord _arg1 = (UWord)(_zzarg1); \ + UWord _arg2 = (UWord)(_zzarg2); \ + WCache* _cache = &(_zzcache); \ + tl_assert(_cache->dynMax >= 1); \ + tl_assert(_cache->dynMax <= N_WCACHE_STAT_MAX); \ + tl_assert(_cache->inUse >= 0); \ + tl_assert(_cache->inUse <= _cache->dynMax); \ + if (_cache->inUse > 0) { \ + if (_cache->ent[0].arg1 == _arg1 \ + && _cache->ent[0].arg2 == _arg2) \ + return (_retty)_cache->ent[0].res; \ + for (_i = 1; _i < _cache->inUse; _i++) { \ + if (_cache->ent[_i].arg1 == _arg1 \ + && _cache->ent[_i].arg2 == _arg2) { \ + WCacheEnt tmp = _cache->ent[_i-1]; \ + _cache->ent[_i-1] = _cache->ent[_i]; \ + _cache->ent[_i] = tmp; \ + return (_retty)_cache->ent[_i-1].res; \ + } \ + } \ + } \ + } while (0) + +#define WCache_UPDATE(_zzcache,_zzarg1,_zzarg2,_zzresult) \ + do { \ + Word _i; \ + UWord _arg1 = (UWord)(_zzarg1); \ + UWord _arg2 = (UWord)(_zzarg2); \ + UWord _res = (UWord)(_zzresult); \ + WCache* _cache = &(_zzcache); \ + tl_assert(_cache->dynMax >= 1); \ + tl_assert(_cache->dynMax <= N_WCACHE_STAT_MAX); \ + tl_assert(_cache->inUse >= 0); \ + tl_assert(_cache->inUse <= _cache->dynMax); \ + if (_cache->inUse < _cache->dynMax) \ + _cache->inUse++; \ + for (_i = _cache->inUse-1; _i >= 1; _i--) \ + _cache->ent[_i] = _cache->ent[_i-1]; \ + _cache->ent[0].arg1 = _arg1; \ + _cache->ent[0].arg2 = _arg2; \ + _cache->ent[0].res = _res; \ + } while (0) + + +//------------------------------------------------------------------// +//--- WordSet ---// +//--- Implementation ---// +//------------------------------------------------------------------// + +typedef + struct { + WordSetU* owner; /* for sanity checking */ + UWord* words; + UWord size; /* Really this should be SizeT */ + } + WordVec; + +/* ix2vec[0 .. ix2vec_used-1] are pointers to the lock sets (WordVecs) + really. vec2ix is the inverse mapping, mapping WordVec* to the + corresponding ix2vec entry number. The two mappings are mutually + redundant. */ +struct _WordSetU { + void* (*alloc)(HChar*,SizeT); + HChar* cc; + void (*dealloc)(void*); + WordFM* vec2ix; /* WordVec-to-WordSet mapping tree */ + WordVec** ix2vec; /* WordSet-to-WordVec mapping array */ + UWord ix2vec_size; + UWord ix2vec_used; + WordSet empty; /* cached, for speed */ + /* Caches for some operations */ + WCache cache_addTo; + WCache cache_delFrom; + WCache cache_intersect; + WCache cache_minus; + /* Stats */ + UWord n_add; + UWord n_add_uncached; + UWord n_del; + UWord n_del_uncached; + UWord n_union; + UWord n_intersect; + UWord n_intersect_uncached; + UWord n_minus; + UWord n_minus_uncached; + UWord n_elem; + UWord n_doubleton; + UWord n_isEmpty; + UWord n_isSingleton; + UWord n_anyElementOf; + UWord n_isSubsetOf; + }; + +/* Create a new WordVec of the given size. */ + +static WordVec* new_WV_of_size ( WordSetU* wsu, UWord sz ) +{ + WordVec* wv; + tl_assert(sz >= 0); + wv = wsu->alloc( wsu->cc, sizeof(WordVec) ); + wv->owner = wsu; + wv->words = NULL; + wv->size = sz; + if (sz > 0) { + wv->words = wsu->alloc( wsu->cc, (SizeT)sz * sizeof(UWord) ); + } + return wv; +} + +static void delete_WV ( WordVec* wv ) +{ + void (*dealloc)(void*) = wv->owner->dealloc; + if (wv->words) { + dealloc(wv->words); + } + dealloc(wv); +} +static void delete_WV_for_FM ( UWord wv ) { + delete_WV( (WordVec*)wv ); +} + +static Word cmp_WordVecs_for_FM ( UWord wv1W, UWord wv2W ) +{ + UWord i; + WordVec* wv1 = (WordVec*)wv1W; + WordVec* wv2 = (WordVec*)wv2W; + UWord common = wv1->size < wv2->size ? wv1->size : wv2->size; + for (i = 0; i < common; i++) { + if (wv1->words[i] == wv2->words[i]) + continue; + if (wv1->words[i] < wv2->words[i]) + return -1; + if (wv1->words[i] > wv2->words[i]) + return 1; + tl_assert(0); + } + /* Ok, the common sections are identical. So now consider the + tails. Both sets are considered to finish in an implied + sequence of -infinity. */ + if (wv1->size < wv2->size) { + tl_assert(common == wv1->size); + return -1; /* impliedly, wv1 contains some -infinitys in places + where wv2 doesn't. */ + } + if (wv1->size > wv2->size) { + tl_assert(common == wv2->size); + return 1; + } + tl_assert(common == wv1->size); + return 0; /* identical */ +} + +static void ensure_ix2vec_space ( WordSetU* wsu ) +{ + UInt i, new_sz; + WordVec** new_vec; + tl_assert(wsu->ix2vec_used <= wsu->ix2vec_size); + if (wsu->ix2vec_used < wsu->ix2vec_size) + return; + new_sz = 2 * wsu->ix2vec_size; + if (new_sz == 0) new_sz = 2; + new_vec = wsu->alloc( wsu->cc, new_sz * sizeof(WordVec*) ); + tl_assert(new_vec); + for (i = 0; i < wsu->ix2vec_size; i++) + new_vec[i] = wsu->ix2vec[i]; + if (wsu->ix2vec) + wsu->dealloc(wsu->ix2vec); + wsu->ix2vec = new_vec; + wsu->ix2vec_size = new_sz; +} + +/* Index into a WordSetU, doing the obvious range check. Failure of + the assertions marked XXX and YYY is an indication of passing the + wrong WordSetU* in the public API of this module. */ +static WordVec* do_ix2vec ( WordSetU* wsu, WordSet ws ) +{ + WordVec* wv; + tl_assert(wsu->ix2vec_used <= wsu->ix2vec_size); + if (wsu->ix2vec_used > 0) + tl_assert(wsu->ix2vec); + /* If this assertion fails, it may mean you supplied a 'ws' + that does not come from the 'wsu' universe. */ + tl_assert(ws < wsu->ix2vec_used); /* XXX */ + wv = wsu->ix2vec[ws]; + /* Make absolutely sure that 'ws' is a member of 'wsu'. */ + tl_assert(wv); + tl_assert(wv->owner == wsu); /* YYY */ + return wv; +} + +/* See if wv is contained within wsu. If so, deallocate wv and return + the index of the already-present copy. If not, add wv to both the + vec2ix and ix2vec mappings and return its index. +*/ +static WordSet add_or_dealloc_WordVec( WordSetU* wsu, WordVec* wv_new ) +{ + Bool have; + WordVec* wv_old; + UWord/*Set*/ ix_old = -1; + /* Really WordSet, but need something that can safely be casted to + a Word* in the lookupFM. Making it WordSet (which is 32 bits) + causes failures on a 64-bit platform. */ + tl_assert(wv_new->owner == wsu); + have = VG_(lookupFM)( wsu->vec2ix, + (Word*)&wv_old, (Word*)&ix_old, + (Word)wv_new ); + if (have) { + tl_assert(wv_old != wv_new); + tl_assert(wv_old); + tl_assert(wv_old->owner == wsu); + tl_assert(ix_old < wsu->ix2vec_used); + tl_assert(wsu->ix2vec[ix_old] == wv_old); + delete_WV( wv_new ); + return (WordSet)ix_old; + } else { + ensure_ix2vec_space( wsu ); + tl_assert(wsu->ix2vec); + tl_assert(wsu->ix2vec_used < wsu->ix2vec_size); + wsu->ix2vec[wsu->ix2vec_used] = wv_new; + VG_(addToFM)( wsu->vec2ix, (Word)wv_new, (Word)wsu->ix2vec_used ); + if (0) VG_(printf)("aodW %d\n", (Int)wsu->ix2vec_used ); + wsu->ix2vec_used++; + tl_assert(wsu->ix2vec_used <= wsu->ix2vec_size); + return (WordSet)(wsu->ix2vec_used - 1); + } +} + + +WordSetU* HG_(newWordSetU) ( void* (*alloc_nofail)( HChar*, SizeT ), + HChar* cc, + void (*dealloc)(void*), + Word cacheSize ) +{ + WordSetU* wsu; + WordVec* empty; + + wsu = alloc_nofail( cc, sizeof(WordSetU) ); + VG_(memset)( wsu, 0, sizeof(WordSetU) ); + wsu->alloc = alloc_nofail; + wsu->cc = cc; + wsu->dealloc = dealloc; + wsu->vec2ix = VG_(newFM)( alloc_nofail, cc, + dealloc, cmp_WordVecs_for_FM ); + wsu->ix2vec_used = 0; + wsu->ix2vec_size = 0; + wsu->ix2vec = NULL; + WCache_INIT(wsu->cache_addTo, cacheSize); + WCache_INIT(wsu->cache_delFrom, cacheSize); + WCache_INIT(wsu->cache_intersect, cacheSize); + WCache_INIT(wsu->cache_minus, cacheSize); + empty = new_WV_of_size( wsu, 0 ); + wsu->empty = add_or_dealloc_WordVec( wsu, empty ); + + return wsu; +} + +void HG_(deleteWordSetU) ( WordSetU* wsu ) +{ + void (*dealloc)(void*) = wsu->dealloc; + tl_assert(wsu->vec2ix); + VG_(deleteFM)( wsu->vec2ix, delete_WV_for_FM, NULL/*val-finalizer*/ ); + if (wsu->ix2vec) + dealloc(wsu->ix2vec); + dealloc(wsu); +} + +WordSet HG_(emptyWS) ( WordSetU* wsu ) +{ + return wsu->empty; +} + +Bool HG_(isEmptyWS) ( WordSetU* wsu, WordSet ws ) +{ + WordVec* wv = do_ix2vec( wsu, ws ); + wsu->n_isEmpty++; + if (wv->size == 0) { + tl_assert(ws == wsu->empty); + return True; + } else { + tl_assert(ws != wsu->empty); + return False; + } +} + +Bool HG_(isSingletonWS) ( WordSetU* wsu, WordSet ws, UWord w ) +{ + WordVec* wv; + tl_assert(wsu); + wsu->n_isSingleton++; + wv = do_ix2vec( wsu, ws ); + return (Bool)(wv->size == 1 && wv->words[0] == w); +} + +UWord HG_(cardinalityWS) ( WordSetU* wsu, WordSet ws ) +{ + WordVec* wv; + tl_assert(wsu); + wv = do_ix2vec( wsu, ws ); + tl_assert(wv->size >= 0); + return wv->size; +} + +UWord HG_(anyElementOfWS) ( WordSetU* wsu, WordSet ws ) +{ + WordVec* wv; + tl_assert(wsu); + wsu->n_anyElementOf++; + wv = do_ix2vec( wsu, ws ); + tl_assert(wv->size >= 1); + return wv->words[0]; +} + +UWord HG_(cardinalityWSU) ( WordSetU* wsu ) +{ + tl_assert(wsu); + return wsu->ix2vec_used; +} + +void HG_(getPayloadWS) ( /*OUT*/UWord** words, /*OUT*/UWord* nWords, + WordSetU* wsu, WordSet ws ) +{ + WordVec* wv; + tl_assert(wsu); + wv = do_ix2vec( wsu, ws ); + tl_assert(wv->size >= 0); + *nWords = wv->size; + *words = wv->words; +} + +Bool HG_(plausibleWS) ( WordSetU* wsu, WordSet ws ) +{ + if (wsu == NULL) return False; + if (ws < 0 || ws >= wsu->ix2vec_used) + return False; + return True; +} + +Bool HG_(saneWS_SLOW) ( WordSetU* wsu, WordSet ws ) +{ + WordVec* wv; + UWord i; + if (wsu == NULL) return False; + if (ws < 0 || ws >= wsu->ix2vec_used) + return False; + wv = do_ix2vec( wsu, ws ); + /* can never happen .. do_ix2vec will assert instead. Oh well. */ + if (wv->owner != wsu) return False; + if (wv->size < 0) return False; + if (wv->size > 0) { + for (i = 0; i < wv->size-1; i++) { + if (wv->words[i] >= wv->words[i+1]) + return False; + } + } + return True; +} + +Bool HG_(elemWS) ( WordSetU* wsu, WordSet ws, UWord w ) +{ + UWord i; + WordVec* wv = do_ix2vec( wsu, ws ); + wsu->n_elem++; + for (i = 0; i < wv->size; i++) { + if (wv->words[i] == w) + return True; + } + return False; +} + +WordSet HG_(doubletonWS) ( WordSetU* wsu, UWord w1, UWord w2 ) +{ + WordVec* wv; + wsu->n_doubleton++; + if (w1 == w2) { + wv = new_WV_of_size(wsu, 1); + wv->words[0] = w1; + } + else if (w1 < w2) { + wv = new_WV_of_size(wsu, 2); + wv->words[0] = w1; + wv->words[1] = w2; + } + else { + tl_assert(w1 > w2); + wv = new_WV_of_size(wsu, 2); + wv->words[0] = w2; + wv->words[1] = w1; + } + return add_or_dealloc_WordVec( wsu, wv ); +} + +WordSet HG_(singletonWS) ( WordSetU* wsu, UWord w ) +{ + return HG_(doubletonWS)( wsu, w, w ); +} + +WordSet HG_(isSubsetOf) ( WordSetU* wsu, WordSet small, WordSet big ) +{ + wsu->n_isSubsetOf++; + return small == HG_(intersectWS)( wsu, small, big ); +} + +void HG_(ppWS) ( WordSetU* wsu, WordSet ws ) +{ + UWord i; + WordVec* wv; + tl_assert(wsu); + wv = do_ix2vec( wsu, ws ); + VG_(printf)("{"); + for (i = 0; i < wv->size; i++) { + VG_(printf)("%p", (void*)wv->words[i]); + if (i < wv->size-1) + VG_(printf)(","); + } + VG_(printf)("}"); +} + +void HG_(ppWSUstats) ( WordSetU* wsu, HChar* name ) +{ + VG_(printf)(" WordSet \"%s\":\n", name); + VG_(printf)(" addTo %10lu (%lu uncached)\n", + wsu->n_add, wsu->n_add_uncached); + VG_(printf)(" delFrom %10lu (%lu uncached)\n", + wsu->n_del, wsu->n_del_uncached); + VG_(printf)(" union %10lu\n", wsu->n_union); + VG_(printf)(" intersect %10lu (%lu uncached) " + "[nb. incl isSubsetOf]\n", + wsu->n_intersect, wsu->n_intersect_uncached); + VG_(printf)(" minus %10lu (%lu uncached)\n", + wsu->n_minus, wsu->n_minus_uncached); + VG_(printf)(" elem %10lu\n", wsu->n_elem); + VG_(printf)(" doubleton %10lu\n", wsu->n_doubleton); + VG_(printf)(" isEmpty %10lu\n", wsu->n_isEmpty); + VG_(printf)(" isSingleton %10lu\n", wsu->n_isSingleton); + VG_(printf)(" anyElementOf %10lu\n", wsu->n_anyElementOf); + VG_(printf)(" isSubsetOf %10lu\n", wsu->n_isSubsetOf); +} + +WordSet HG_(addToWS) ( WordSetU* wsu, WordSet ws, UWord w ) +{ + UWord k, j; + WordVec* wv_new; + WordVec* wv; + WordSet result = (WordSet)(-1); /* bogus */ + + wsu->n_add++; + WCache_LOOKUP_AND_RETURN(WordSet, wsu->cache_addTo, ws, w); + wsu->n_add_uncached++; + + /* If already present, this is a no-op. */ + wv = do_ix2vec( wsu, ws ); + for (k = 0; k < wv->size; k++) { + if (wv->words[k] == w) { + result = ws; + goto out; + } + } + /* Ok, not present. Build a new one ... */ + wv_new = new_WV_of_size( wsu, wv->size + 1 ); + k = j = 0; + for (; k < wv->size && wv->words[k] < w; k++) { + wv_new->words[j++] = wv->words[k]; + } + wv_new->words[j++] = w; + for (; k < wv->size; k++) { + tl_assert(wv->words[k] > w); + wv_new->words[j++] = wv->words[k]; + } + tl_assert(j == wv_new->size); + + /* Find any existing copy, or add the new one. */ + result = add_or_dealloc_WordVec( wsu, wv_new ); + tl_assert(result != (WordSet)(-1)); + + out: + WCache_UPDATE(wsu->cache_addTo, ws, w, result); + return result; +} + +WordSet HG_(delFromWS) ( WordSetU* wsu, WordSet ws, UWord w ) +{ + UWord i, j, k; + WordVec* wv_new; + WordSet result = (WordSet)(-1); /* bogus */ + WordVec* wv = do_ix2vec( wsu, ws ); + + wsu->n_del++; + + /* special case empty set */ + if (wv->size == 0) { + tl_assert(ws == wsu->empty); + return ws; + } + + WCache_LOOKUP_AND_RETURN(WordSet, wsu->cache_delFrom, ws, w); + wsu->n_del_uncached++; + + /* If not already present, this is a no-op. */ + for (i = 0; i < wv->size; i++) { + if (wv->words[i] == w) + break; + } + if (i == wv->size) { + result = ws; + goto out; + } + /* So w is present in ws, and the new set will be one element + smaller. */ + tl_assert(i >= 0 && i < wv->size); + tl_assert(wv->size > 0); + + wv_new = new_WV_of_size( wsu, wv->size - 1 ); + j = k = 0; + for (; j < wv->size; j++) { + if (j == i) + continue; + wv_new->words[k++] = wv->words[j]; + } + tl_assert(k == wv_new->size); + + result = add_or_dealloc_WordVec( wsu, wv_new ); + if (wv->size == 1) { + tl_assert(result == wsu->empty); + } + + out: + WCache_UPDATE(wsu->cache_delFrom, ws, w, result); + return result; +} + +WordSet HG_(unionWS) ( WordSetU* wsu, WordSet ws1, WordSet ws2 ) +{ + UWord i1, i2, k, sz; + WordVec* wv_new; + WordVec* wv1 = do_ix2vec( wsu, ws1 ); + WordVec* wv2 = do_ix2vec( wsu, ws2 ); + wsu->n_union++; + sz = 0; + i1 = i2 = 0; + while (1) { + if (i1 >= wv1->size || i2 >= wv2->size) + break; + sz++; + if (wv1->words[i1] < wv2->words[i2]) { + i1++; + } else + if (wv1->words[i1] > wv2->words[i2]) { + i2++; + } else { + i1++; + i2++; + } + } + tl_assert(i1 <= wv1->size); + tl_assert(i2 <= wv2->size); + tl_assert(i1 == wv1->size || i2 == wv2->size); + if (i1 == wv1->size && i2 < wv2->size) { + sz += (wv2->size - i2); + } + if (i2 == wv2->size && i1 < wv1->size) { + sz += (wv1->size - i1); + } + + wv_new = new_WV_of_size( wsu, sz ); + k = 0; + + i1 = i2 = 0; + while (1) { + if (i1 >= wv1->size || i2 >= wv2->size) + break; + if (wv1->words[i1] < wv2->words[i2]) { + wv_new->words[k++] = wv1->words[i1]; + i1++; + } else + if (wv1->words[i1] > wv2->words[i2]) { + wv_new->words[k++] = wv2->words[i2]; + i2++; + } else { + wv_new->words[k++] = wv1->words[i1]; + i1++; + i2++; + } + } + tl_assert(i1 <= wv1->size); + tl_assert(i2 <= wv2->size); + tl_assert(i1 == wv1->size || i2 == wv2->size); + if (i1 == wv1->size && i2 < wv2->size) { + while (i2 < wv2->size) + wv_new->words[k++] = wv2->words[i2++]; + } + if (i2 == wv2->size && i1 < wv1->size) { + while (i1 < wv1->size) + wv_new->words[k++] = wv1->words[i1++]; + } + + tl_assert(k == sz); + + return add_or_dealloc_WordVec( wsu, wv_new ); +} + +WordSet HG_(intersectWS) ( WordSetU* wsu, WordSet ws1, WordSet ws2 ) +{ + UWord i1, i2, k, sz; + WordSet ws_new = (WordSet)(-1); /* bogus */ + WordVec* wv_new; + WordVec* wv1; + WordVec* wv2; + + wsu->n_intersect++; + + /* Deal with an obvious case fast. */ + if (ws1 == ws2) + return ws1; + + /* Since intersect(x,y) == intersect(y,x), convert both variants to + the same query. This reduces the number of variants the cache + has to deal with. */ + if (ws1 > ws2) { + WordSet wst = ws1; ws1 = ws2; ws2 = wst; + } + + WCache_LOOKUP_AND_RETURN(WordSet, wsu->cache_intersect, ws1, ws2); + wsu->n_intersect_uncached++; + + wv1 = do_ix2vec( wsu, ws1 ); + wv2 = do_ix2vec( wsu, ws2 ); + sz = 0; + i1 = i2 = 0; + while (1) { + if (i1 >= wv1->size || i2 >= wv2->size) + break; + if (wv1->words[i1] < wv2->words[i2]) { + i1++; + } else + if (wv1->words[i1] > wv2->words[i2]) { + i2++; + } else { + sz++; + i1++; + i2++; + } + } + tl_assert(i1 <= wv1->size); + tl_assert(i2 <= wv2->size); + tl_assert(i1 == wv1->size || i2 == wv2->size); + + wv_new = new_WV_of_size( wsu, sz ); + k = 0; + + i1 = i2 = 0; + while (1) { + if (i1 >= wv1->size || i2 >= wv2->size) + break; + if (wv1->words[i1] < wv2->words[i2]) { + i1++; + } else + if (wv1->words[i1] > wv2->words[i2]) { + i2++; + } else { + wv_new->words[k++] = wv1->words[i1]; + i1++; + i2++; + } + } + tl_assert(i1 <= wv1->size); + tl_assert(i2 <= wv2->size); + tl_assert(i1 == wv1->size || i2 == wv2->size); + + tl_assert(k == sz); + + ws_new = add_or_dealloc_WordVec( wsu, wv_new ); + if (sz == 0) { + tl_assert(ws_new == wsu->empty); + } + + tl_assert(ws_new != (WordSet)(-1)); + WCache_UPDATE(wsu->cache_intersect, ws1, ws2, ws_new); + + return ws_new; +} + +WordSet HG_(minusWS) ( WordSetU* wsu, WordSet ws1, WordSet ws2 ) +{ + UWord i1, i2, k, sz; + WordSet ws_new = (WordSet)(-1); /* bogus */ + WordVec* wv_new; + WordVec* wv1; + WordVec* wv2; + + wsu->n_minus++; + WCache_LOOKUP_AND_RETURN(WordSet, wsu->cache_minus, ws1, ws2); + wsu->n_minus_uncached++; + + wv1 = do_ix2vec( wsu, ws1 ); + wv2 = do_ix2vec( wsu, ws2 ); + sz = 0; + i1 = i2 = 0; + while (1) { + if (i1 >= wv1->size || i2 >= wv2->size) + break; + if (wv1->words[i1] < wv2->words[i2]) { + sz++; + i1++; + } else + if (wv1->words[i1] > wv2->words[i2]) { + i2++; + } else { + i1++; + i2++; + } + } + tl_assert(i1 <= wv1->size); + tl_assert(i2 <= wv2->size); + tl_assert(i1 == wv1->size || i2 == wv2->size); + if (i2 == wv2->size && i1 < wv1->size) { + sz += (wv1->size - i1); + } + + wv_new = new_WV_of_size( wsu, sz ); + k = 0; + + i1 = i2 = 0; + while (1) { + if (i1 >= wv1->size || i2 >= wv2->size) + break; + if (wv1->words[i1] < wv2->words[i2]) { + wv_new->words[k++] = wv1->words[i1]; + i1++; + } else + if (wv1->words[i1] > wv2->words[i2]) { + i2++; + } else { + i1++; + i2++; + } + } + tl_assert(i1 <= wv1->size); + tl_assert(i2 <= wv2->size); + tl_assert(i1 == wv1->size || i2 == wv2->size); + if (i2 == wv2->size && i1 < wv1->size) { + while (i1 < wv1->size) + wv_new->words[k++] = wv1->words[i1++]; + } + + tl_assert(k == sz); + + ws_new = add_or_dealloc_WordVec( wsu, wv_new ); + if (sz == 0) { + tl_assert(ws_new == wsu->empty); + } + + tl_assert(ws_new != (WordSet)(-1)); + WCache_UPDATE(wsu->cache_minus, ws1, ws2, ws_new); + + return ws_new; +} + +static __attribute__((unused)) +void show_WS ( WordSetU* wsu, WordSet ws ) +{ + UWord i; + WordVec* wv = do_ix2vec( wsu, ws ); + VG_(printf)("#%u{", ws); + for (i = 0; i < wv->size; i++) { + VG_(printf)("%lu", wv->words[i]); + if (i < wv->size-1) + VG_(printf)(","); + } + VG_(printf)("}\n"); +} + +//------------------------------------------------------------------// +//--- end WordSet ---// +//--- Implementation ---// +//------------------------------------------------------------------// + +/*--------------------------------------------------------------------*/ +/*--- end hg_wordset.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/.svn/text-base/hg_wordset.h.svn-base b/helgrind/.svn/text-base/hg_wordset.h.svn-base new file mode 100644 index 0000000..1d1a72f --- /dev/null +++ b/helgrind/.svn/text-base/hg_wordset.h.svn-base @@ -0,0 +1,101 @@ + +/*--------------------------------------------------------------------*/ +/*--- Sets of words, with unique set identifiers. ---*/ +/*--- hg_wordset.h ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks LLP + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. + + Neither the names of the U.S. Department of Energy nor the + University of California nor the names of its contributors may be + used to endorse or promote products derived from this software + without prior written permission. +*/ + +#ifndef __HG_WORDSET_H +#define __HG_WORDSET_H + +//------------------------------------------------------------------// +//--- WordSet ---// +//--- Public Interface ---// +//------------------------------------------------------------------// + +typedef struct _WordSetU WordSetU; /* opaque */ + +typedef UInt WordSet; /* opaque, small int index */ + +/* Allocate and initialise a WordSetU */ +WordSetU* HG_(newWordSetU) ( void* (*alloc_nofail)( HChar*, SizeT ), + HChar* cc, + void (*dealloc)(void*), + Word cacheSize ); + +/* Free up the WordSetU. */ +void HG_(deleteWordSetU) ( WordSetU* ); + +/* Get the number of elements in this WordSetU. */ +UWord HG_(cardinalityWSU) ( WordSetU* ); + +/* Show performance stats for this WordSetU. */ +void HG_(ppWSUstats) ( WordSetU* wsu, HChar* name ); + + +/* Element-level operations on WordSets. Note that the WordSet + numbers given out are 0, 1, 2, 3, etc, and as it happens 0 always + represents the empty set. */ + +WordSet HG_(emptyWS) ( WordSetU* ); +WordSet HG_(addToWS) ( WordSetU*, WordSet, UWord ); +WordSet HG_(delFromWS) ( WordSetU*, WordSet, UWord ); +WordSet HG_(unionWS) ( WordSetU*, WordSet, WordSet ); +WordSet HG_(intersectWS) ( WordSetU*, WordSet, WordSet ); +WordSet HG_(minusWS) ( WordSetU*, WordSet, WordSet ); +Bool HG_(isEmptyWS) ( WordSetU*, WordSet ); +Bool HG_(isSingletonWS) ( WordSetU*, WordSet, UWord ); +UWord HG_(anyElementOfWS) ( WordSetU*, WordSet ); +UWord HG_(cardinalityWS) ( WordSetU*, WordSet ); +Bool HG_(elemWS) ( WordSetU*, WordSet, UWord ); +WordSet HG_(doubletonWS) ( WordSetU*, UWord, UWord ); +WordSet HG_(singletonWS) ( WordSetU*, UWord ); +WordSet HG_(isSubsetOf) ( WordSetU*, WordSet, WordSet ); + +Bool HG_(plausibleWS) ( WordSetU*, WordSet ); +Bool HG_(saneWS_SLOW) ( WordSetU*, WordSet ); + +void HG_(ppWS) ( WordSetU*, WordSet ); +void HG_(getPayloadWS) ( /*OUT*/UWord** words, /*OUT*/UWord* nWords, + WordSetU*, WordSet ); + + +//------------------------------------------------------------------// +//--- end WordSet ---// +//--- Public Interface ---// +//------------------------------------------------------------------// + +#endif /* ! __HG_WORDSET_H */ + +/*--------------------------------------------------------------------*/ +/*--- end hg_wordset.h ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/.svn/text-base/libhb.h.svn-base b/helgrind/.svn/text-base/libhb.h.svn-base new file mode 100644 index 0000000..b204883 --- /dev/null +++ b/helgrind/.svn/text-base/libhb.h.svn-base @@ -0,0 +1,156 @@ + +/*--------------------------------------------------------------------*/ +/*--- LibHB: a library for implementing and checking ---*/ +/*--- the happens-before relationship in concurrent programs. ---*/ +/*--- libhb_main.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of LibHB, a library for implementing and checking + the happens-before relationship in concurrent programs. + + Copyright (C) 2008-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#ifndef __LIBHB_H +#define __LIBHB_H + +/* Abstract to user: thread identifiers */ +/* typedef struct _Thr Thr; */ /* now in hg_lock_n_thread.h */ + +/* Abstract to user: synchronisation objects */ +/* typedef struct _SO SO; */ /* now in hg_lock_n_thread.h */ + +/* Initialise library; returns Thr* for root thread. 'shadow_alloc' + should never return NULL, instead it should simply not return if + they encounter an out-of-memory condition. */ +Thr* libhb_init ( + void (*get_stacktrace)( Thr*, Addr*, UWord ), + ExeContext* (*get_EC)( Thr* ) + ); + +/* Shut down the library, and print stats (in fact that's _all_ + this is for.) */ +void libhb_shutdown ( Bool show_stats ); + +/* Thread creation: returns Thr* for new thread */ +Thr* libhb_create ( Thr* parent ); + +/* Thread async exit */ +void libhb_async_exit ( Thr* exitter ); + +/* Synchronisation objects (abstract to caller) */ + +/* Allocate a new one (alloc'd by library) */ +SO* libhb_so_alloc ( void ); + +/* Dealloc one */ +void libhb_so_dealloc ( SO* so ); + +/* Send a message via a sync object. If strong_send is true, the + resulting inter-thread dependency seen by a future receiver of this + message will be a dependency on this thread only. That is, in a + strong send, the VC inside the SO is replaced by the clock of the + sending thread. For a weak send, the sender's VC is joined into + that already in the SO, if any. This subtlety is needed to model + rwlocks: a strong send corresponds to releasing a rwlock that had + been w-held (or releasing a standard mutex). A weak send + corresponds to releasing a rwlock that has been r-held. + + (rationale): Since in general many threads may hold a rwlock in + r-mode, a weak send facility is necessary in order that the final + SO reflects the join of the VCs of all the threads releasing the + rwlock, rather than merely holding the VC of the most recent thread + to release it. */ +void libhb_so_send ( Thr* thr, SO* so, Bool strong_send ); + +/* Recv a message from a sync object. If strong_recv is True, the + resulting inter-thread dependency is considered adequate to induce + a h-b ordering on both reads and writes. If it is False, the + implied h-b ordering exists only for reads, not writes. This is + subtlety is required in order to support reader-writer locks: a + thread doing a write-acquire of a rwlock (or acquiring a normal + mutex) models this by doing a strong receive. A thread doing a + read-acquire of a rwlock models this by doing a !strong_recv. */ +void libhb_so_recv ( Thr* thr, SO* so, Bool strong_recv ); + +/* Has this SO ever been sent on? */ +Bool libhb_so_everSent ( SO* so ); + +/* Memory accesses (1/2/4/8 byte size). They report a race if one is + found. */ +#define LIBHB_WRITE_1(_thr,_a) zsm_apply8___msm_write((_thr),(_a)) +#define LIBHB_WRITE_2(_thr,_a) zsm_apply16___msm_write((_thr),(_a)) +#define LIBHB_WRITE_4(_thr,_a) zsm_apply32___msm_write((_thr),(_a)) +#define LIBHB_WRITE_8(_thr,_a) zsm_apply64___msm_write((_thr),(_a)) +#define LIBHB_WRITE_N(_thr,_a,_n) zsm_apply_range___msm_read((_thr),(_a),(_n)) + +#define LIBHB_READ_1(_thr,_a) zsm_apply8___msm_read((_thr),(_a)) +#define LIBHB_READ_2(_thr,_a) zsm_apply16___msm_read((_thr),(_a)) +#define LIBHB_READ_4(_thr,_a) zsm_apply32___msm_read((_thr),(_a)) +#define LIBHB_READ_8(_thr,_a) zsm_apply64___msm_read((_thr),(_a)) +#define LIBHB_READ_N(_thr,_a,_n) zsm_apply_range___msm_read((_thr),(_a),(_n)) + +void zsm_apply8___msm_write ( Thr* thr, Addr a ); +void zsm_apply16___msm_write ( Thr* thr, Addr a ); +void zsm_apply32___msm_write ( Thr* thr, Addr a ); +void zsm_apply64___msm_write ( Thr* thr, Addr a ); +void zsm_apply_range___msm_write ( Thr* thr, + Addr a, SizeT len ); + +void zsm_apply8___msm_read ( Thr* thr, Addr a ); +void zsm_apply16___msm_read ( Thr* thr, Addr a ); +void zsm_apply32___msm_read ( Thr* thr, Addr a ); +void zsm_apply64___msm_read ( Thr* thr, Addr a ); +void zsm_apply_range___msm_read ( Thr* thr, + Addr a, SizeT len ); + + +/* Set memory address ranges to new (freshly allocated), or noaccess + (no longer accessible). */ +void libhb_range_new ( Thr*, Addr, SizeT ); +void libhb_range_noaccess ( Thr*, Addr, SizeT ); + +/* For the convenience of callers, we offer to store one void* item in + a Thr, which we ignore, but the caller can get or set any time. */ +void* libhb_get_Thr_opaque ( Thr* ); +void libhb_set_Thr_opaque ( Thr*, void* ); + +/* Low level copy of shadow state from [src,src+len) to [dst,dst+len). + Overlapping moves are checked for and asserted against. */ +void libhb_copy_shadow_state ( Addr src, Addr dst, SizeT len ); + +/* Call this periodically to give libhb the opportunity to + garbage-collect its internal data structures. */ +void libhb_maybe_GC ( void ); + +/* Extract info from the conflicting-access machinery. */ +Bool libhb_event_map_lookup ( /*OUT*/ExeContext** resEC, + /*OUT*/Thr** resThr, + /*OUT*/SizeT* resSzB, + /*OUT*/Bool* resIsW, + Thr* thr, Addr a, SizeT szB, Bool isW ); + +#endif /* __LIBHB_H */ + +/*--------------------------------------------------------------------*/ +/*--- end libhb.h ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/.svn/text-base/libhb_core.c.svn-base b/helgrind/.svn/text-base/libhb_core.c.svn-base new file mode 100644 index 0000000..572b26b --- /dev/null +++ b/helgrind/.svn/text-base/libhb_core.c.svn-base @@ -0,0 +1,5011 @@ + +/*--------------------------------------------------------------------*/ +/*--- LibHB: a library for implementing and checking ---*/ +/*--- the happens-before relationship in concurrent programs. ---*/ +/*--- libhb_main.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of LibHB, a library for implementing and checking + the happens-before relationship in concurrent programs. + + Copyright (C) 2008-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_libcassert.h" +#include "pub_tool_libcbase.h" +#include "pub_tool_libcprint.h" +#include "pub_tool_mallocfree.h" +#include "pub_tool_wordfm.h" +#include "pub_tool_sparsewa.h" +#include "pub_tool_xarray.h" +#include "pub_tool_oset.h" +#include "pub_tool_threadstate.h" +#include "pub_tool_aspacemgr.h" +#include "pub_tool_execontext.h" +#include "pub_tool_errormgr.h" +#include "pub_tool_options.h" // VG_(clo_verbosity) +#include "hg_basics.h" +#include "hg_wordset.h" +#include "hg_lock_n_thread.h" +#include "hg_errors.h" + +#include "libhb.h" + + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// Debugging #defines // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + +/* Check the sanity of shadow values in the core memory state + machine. Change #if 0 to #if 1 to enable this. */ +#if 0 +# define CHECK_MSM 1 +#else +# define CHECK_MSM 0 +#endif + + +/* Check sanity (reference counts, etc) in the conflicting access + machinery. Change #if 0 to #if 1 to enable this. */ +#if 0 +# define CHECK_CEM 1 +#else +# define CHECK_CEM 0 +#endif + + +/* Check sanity in the compressed shadow memory machinery, + particularly in its caching innards. Unfortunately there's no + almost-zero-cost way to make them selectable at run time. Hence + set the #if 0 to #if 1 and rebuild if you want them. */ +#if 0 +# define CHECK_ZSM 1 /* do sanity-check CacheLine stuff */ +# define inline __attribute__((noinline)) + /* probably want to ditch -fomit-frame-pointer too */ +#else +# define CHECK_ZSM 0 /* don't sanity-check CacheLine stuff */ +#endif + + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// Forward declarations // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + +/* fwds for + Globals needed by other parts of the library. These are set + once at startup and then never changed. */ +static void (*main_get_stacktrace)( Thr*, Addr*, UWord ) = NULL; +static ExeContext* (*main_get_EC)( Thr* ) = NULL; + + + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// SECTION BEGIN compressed shadow memory // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + +#ifndef __HB_ZSM_H +#define __HB_ZSM_H + +typedef ULong SVal; + +/* This value has special significance to the implementation, and callers + may not store it in the shadow memory. */ +#define SVal_INVALID (3ULL << 62) + +/* This is the default value for shadow memory. Initially the shadow + memory contains no accessible areas and so all reads produce this + value. TODO: make this caller-defineable. */ +#define SVal_NOACCESS (2ULL << 62) + +/* Initialise the library. Once initialised, it will (or may) call + rcinc and rcdec in response to all the calls below, in order to + allow the user to do reference counting on the SVals stored herein. + It is important to understand, however, that due to internal + caching, the reference counts are in general inaccurate, and can be + both above or below the true reference count for an item. In + particular, the library may indicate that the reference count for + an item is zero, when in fact it is not. + + To make the reference counting exact and therefore non-pointless, + call zsm_flush_cache. Immediately after it returns, the reference + counts for all items, as deduced by the caller by observing calls + to rcinc and rcdec, will be correct, and so any items with a zero + reference count may be freed (or at least considered to be + unreferenced by this library). +*/ +static void zsm_init ( void(*rcinc)(SVal), void(*rcdec)(SVal) ); + +static void zsm_set_range ( Addr, SizeT, SVal ); +static SVal zsm_read8 ( Addr ); +static void zsm_copy_range ( Addr, Addr, SizeT ); +static void zsm_flush_cache ( void ); + +#endif /* ! __HB_ZSM_H */ + + +/* Round a up to the next multiple of N. N must be a power of 2 */ +#define ROUNDUP(a, N) ((a + N - 1) & ~(N-1)) +/* Round a down to the next multiple of N. N must be a power of 2 */ +#define ROUNDDN(a, N) ((a) & ~(N-1)) + + + +/* ------ User-supplied RC functions ------ */ +static void(*rcinc)(SVal) = NULL; +static void(*rcdec)(SVal) = NULL; + + +/* ------ CacheLine ------ */ + +#define N_LINE_BITS 6 /* must be >= 3 */ +#define N_LINE_ARANGE (1 << N_LINE_BITS) +#define N_LINE_TREES (N_LINE_ARANGE >> 3) + +typedef + struct { + UShort descrs[N_LINE_TREES]; + SVal svals[N_LINE_ARANGE]; // == N_LINE_TREES * 8 + } + CacheLine; + +#define TREE_DESCR_16_0 (1<<0) +#define TREE_DESCR_32_0 (1<<1) +#define TREE_DESCR_16_1 (1<<2) +#define TREE_DESCR_64 (1<<3) +#define TREE_DESCR_16_2 (1<<4) +#define TREE_DESCR_32_1 (1<<5) +#define TREE_DESCR_16_3 (1<<6) +#define TREE_DESCR_8_0 (1<<7) +#define TREE_DESCR_8_1 (1<<8) +#define TREE_DESCR_8_2 (1<<9) +#define TREE_DESCR_8_3 (1<<10) +#define TREE_DESCR_8_4 (1<<11) +#define TREE_DESCR_8_5 (1<<12) +#define TREE_DESCR_8_6 (1<<13) +#define TREE_DESCR_8_7 (1<<14) +#define TREE_DESCR_DTY (1<<15) + +typedef + struct { + SVal dict[4]; /* can represent up to 4 diff values in the line */ + UChar ix2s[N_LINE_ARANGE/4]; /* array of N_LINE_ARANGE 2-bit + dict indexes */ + /* if dict[0] == SVal_INVALID then dict[1] is the index of the + LineF to use, and dict[2..] are also SVal_INVALID. */ + } + LineZ; /* compressed rep for a cache line */ + +typedef + struct { + Bool inUse; + SVal w64s[N_LINE_ARANGE]; + } + LineF; /* full rep for a cache line */ + +/* Shadow memory. + Primary map is a WordFM Addr SecMap*. + SecMaps cover some page-size-ish section of address space and hold + a compressed representation. + CacheLine-sized chunks of SecMaps are copied into a Cache, being + decompressed when moved into the cache and recompressed on the + way out. Because of this, the cache must operate as a writeback + cache, not a writethrough one. + + Each SecMap must hold a power-of-2 number of CacheLines. Hence + N_SECMAP_BITS must >= N_LINE_BITS. +*/ +#define N_SECMAP_BITS 13 +#define N_SECMAP_ARANGE (1 << N_SECMAP_BITS) + +// # CacheLines held by a SecMap +#define N_SECMAP_ZLINES (N_SECMAP_ARANGE / N_LINE_ARANGE) + +/* The data in the SecMap is held in the array of LineZs. Each LineZ + either carries the required data directly, in a compressed + representation, or it holds (in .dict[0]) an index to the LineF in + .linesF that holds the full representation. + + Currently-unused LineF's have their .inUse bit set to zero. + Since each in-use LineF is referred to be exactly one LineZ, + the number of .linesZ[] that refer to .linesF should equal + the number of .linesF[] that have .inUse == True. + + RC obligations: the RCs presented to the user include exactly + the values in: + * direct Z reps, that is, ones for which .dict[0] != SVal_INVALID + * F reps that are in use (.inUse == True) + + Hence the following actions at the following transitions are required: + + F rep: .inUse==True -> .inUse==False -- rcdec_LineF + F rep: .inUse==False -> .inUse==True -- rcinc_LineF + Z rep: .dict[0] from other to SVal_INVALID -- rcdec_LineZ + Z rep: .dict[0] from SVal_INVALID to other -- rcinc_LineZ +*/ +typedef + struct { + UInt magic; + LineZ linesZ[N_SECMAP_ZLINES]; + LineF* linesF; + UInt linesF_size; + } + SecMap; + +#define SecMap_MAGIC 0x571e58cbU + +static inline Bool is_sane_SecMap ( SecMap* sm ) { + return sm != NULL && sm->magic == SecMap_MAGIC; +} + +/* ------ Cache ------ */ + +#define N_WAY_BITS 16 +#define N_WAY_NENT (1 << N_WAY_BITS) + +/* Each tag is the address of the associated CacheLine, rounded down + to a CacheLine address boundary. A CacheLine size must be a power + of 2 and must be 8 or more. Hence an easy way to initialise the + cache so it is empty is to set all the tag values to any value % 8 + != 0, eg 1. This means all queries in the cache initially miss. + It does however require us to detect and not writeback, any line + with a bogus tag. */ +typedef + struct { + CacheLine lyns0[N_WAY_NENT]; + Addr tags0[N_WAY_NENT]; + } + Cache; + +static inline Bool is_valid_scache_tag ( Addr tag ) { + /* a valid tag should be naturally aligned to the start of + a CacheLine. */ + return 0 == (tag & (N_LINE_ARANGE - 1)); +} + + +/* --------- Primary data structures --------- */ + +/* Shadow memory primary map */ +static WordFM* map_shmem = NULL; /* WordFM Addr SecMap* */ +static Cache cache_shmem; + + +static UWord stats__secmaps_search = 0; // # SM finds +static UWord stats__secmaps_search_slow = 0; // # SM lookupFMs +static UWord stats__secmaps_allocd = 0; // # SecMaps issued +static UWord stats__secmap_ga_space_covered = 0; // # ga bytes covered +static UWord stats__secmap_linesZ_allocd = 0; // # LineZ's issued +static UWord stats__secmap_linesZ_bytes = 0; // .. using this much storage +static UWord stats__secmap_linesF_allocd = 0; // # LineF's issued +static UWord stats__secmap_linesF_bytes = 0; // .. using this much storage +static UWord stats__secmap_iterator_steppings = 0; // # calls to stepSMIter +static UWord stats__cache_Z_fetches = 0; // # Z lines fetched +static UWord stats__cache_Z_wbacks = 0; // # Z lines written back +static UWord stats__cache_F_fetches = 0; // # F lines fetched +static UWord stats__cache_F_wbacks = 0; // # F lines written back +static UWord stats__cache_invals = 0; // # cache invals +static UWord stats__cache_flushes = 0; // # cache flushes +static UWord stats__cache_totrefs = 0; // # total accesses +static UWord stats__cache_totmisses = 0; // # misses +static ULong stats__cache_make_New_arange = 0; // total arange made New +static ULong stats__cache_make_New_inZrep = 0; // arange New'd on Z reps +static UWord stats__cline_normalises = 0; // # calls to cacheline_normalise +static UWord stats__cline_read64s = 0; // # calls to s_m_read64 +static UWord stats__cline_read32s = 0; // # calls to s_m_read32 +static UWord stats__cline_read16s = 0; // # calls to s_m_read16 +static UWord stats__cline_read8s = 0; // # calls to s_m_read8 +static UWord stats__cline_write64s = 0; // # calls to s_m_write64 +static UWord stats__cline_write32s = 0; // # calls to s_m_write32 +static UWord stats__cline_write16s = 0; // # calls to s_m_write16 +static UWord stats__cline_write8s = 0; // # calls to s_m_write8 +static UWord stats__cline_set64s = 0; // # calls to s_m_set64 +static UWord stats__cline_set32s = 0; // # calls to s_m_set32 +static UWord stats__cline_set16s = 0; // # calls to s_m_set16 +static UWord stats__cline_set8s = 0; // # calls to s_m_set8 +static UWord stats__cline_get8s = 0; // # calls to s_m_get8 +static UWord stats__cline_copy8s = 0; // # calls to s_m_copy8 +static UWord stats__cline_64to32splits = 0; // # 64-bit accesses split +static UWord stats__cline_32to16splits = 0; // # 32-bit accesses split +static UWord stats__cline_16to8splits = 0; // # 16-bit accesses split +static UWord stats__cline_64to32pulldown = 0; // # calls to pulldown_to_32 +static UWord stats__cline_32to16pulldown = 0; // # calls to pulldown_to_16 +static UWord stats__cline_16to8pulldown = 0; // # calls to pulldown_to_8 + +static inline Addr shmem__round_to_SecMap_base ( Addr a ) { + return a & ~(N_SECMAP_ARANGE - 1); +} +static inline UWord shmem__get_SecMap_offset ( Addr a ) { + return a & (N_SECMAP_ARANGE - 1); +} + + +/*----------------------------------------------------------------*/ +/*--- map_shmem :: WordFM Addr SecMap ---*/ +/*--- shadow memory (low level handlers) (shmem__* fns) ---*/ +/*----------------------------------------------------------------*/ + +/*--------------- SecMap allocation --------------- */ + +static HChar* shmem__bigchunk_next = NULL; +static HChar* shmem__bigchunk_end1 = NULL; + +static void* shmem__bigchunk_alloc ( SizeT n ) +{ + const SizeT sHMEM__BIGCHUNK_SIZE = 4096 * 256 * 4; + tl_assert(n > 0); + n = VG_ROUNDUP(n, 16); + tl_assert(shmem__bigchunk_next <= shmem__bigchunk_end1); + tl_assert(shmem__bigchunk_end1 - shmem__bigchunk_next + <= (SSizeT)sHMEM__BIGCHUNK_SIZE); + if (shmem__bigchunk_next + n > shmem__bigchunk_end1) { + if (0) + VG_(printf)("XXXXX bigchunk: abandoning %d bytes\n", + (Int)(shmem__bigchunk_end1 - shmem__bigchunk_next)); + shmem__bigchunk_next = VG_(am_shadow_alloc)( sHMEM__BIGCHUNK_SIZE ); + if (shmem__bigchunk_next == NULL) + VG_(out_of_memory_NORETURN)( + "helgrind:shmem__bigchunk_alloc", sHMEM__BIGCHUNK_SIZE ); + shmem__bigchunk_end1 = shmem__bigchunk_next + sHMEM__BIGCHUNK_SIZE; + } + tl_assert(shmem__bigchunk_next); + tl_assert( 0 == (((Addr)shmem__bigchunk_next) & (16-1)) ); + tl_assert(shmem__bigchunk_next + n <= shmem__bigchunk_end1); + shmem__bigchunk_next += n; + return shmem__bigchunk_next - n; +} + +static SecMap* shmem__alloc_SecMap ( void ) +{ + Word i, j; + SecMap* sm = shmem__bigchunk_alloc( sizeof(SecMap) ); + if (0) VG_(printf)("alloc_SecMap %p\n",sm); + tl_assert(sm); + sm->magic = SecMap_MAGIC; + for (i = 0; i < N_SECMAP_ZLINES; i++) { + sm->linesZ[i].dict[0] = SVal_NOACCESS; + sm->linesZ[i].dict[1] = SVal_INVALID; + sm->linesZ[i].dict[2] = SVal_INVALID; + sm->linesZ[i].dict[3] = SVal_INVALID; + for (j = 0; j < N_LINE_ARANGE/4; j++) + sm->linesZ[i].ix2s[j] = 0; /* all reference dict[0] */ + } + sm->linesF = NULL; + sm->linesF_size = 0; + stats__secmaps_allocd++; + stats__secmap_ga_space_covered += N_SECMAP_ARANGE; + stats__secmap_linesZ_allocd += N_SECMAP_ZLINES; + stats__secmap_linesZ_bytes += N_SECMAP_ZLINES * sizeof(LineZ); + return sm; +} + +typedef struct { Addr gaKey; SecMap* sm; } SMCacheEnt; +static SMCacheEnt smCache[3] = { {1,NULL}, {1,NULL}, {1,NULL} }; + +static SecMap* shmem__find_SecMap ( Addr ga ) +{ + SecMap* sm = NULL; + Addr gaKey = shmem__round_to_SecMap_base(ga); + // Cache + stats__secmaps_search++; + if (LIKELY(gaKey == smCache[0].gaKey)) + return smCache[0].sm; + if (LIKELY(gaKey == smCache[1].gaKey)) { + SMCacheEnt tmp = smCache[0]; + smCache[0] = smCache[1]; + smCache[1] = tmp; + return smCache[0].sm; + } + if (gaKey == smCache[2].gaKey) { + SMCacheEnt tmp = smCache[1]; + smCache[1] = smCache[2]; + smCache[2] = tmp; + return smCache[1].sm; + } + // end Cache + stats__secmaps_search_slow++; + if (VG_(lookupFM)( map_shmem, + NULL/*keyP*/, (UWord*)&sm, (UWord)gaKey )) { + tl_assert(sm != NULL); + smCache[2] = smCache[1]; + smCache[1] = smCache[0]; + smCache[0].gaKey = gaKey; + smCache[0].sm = sm; + } else { + tl_assert(sm == NULL); + } + return sm; +} + +static SecMap* shmem__find_or_alloc_SecMap ( Addr ga ) +{ + SecMap* sm = shmem__find_SecMap ( ga ); + if (LIKELY(sm)) { + return sm; + } else { + /* create a new one */ + Addr gaKey = shmem__round_to_SecMap_base(ga); + sm = shmem__alloc_SecMap(); + tl_assert(sm); + VG_(addToFM)( map_shmem, (UWord)gaKey, (UWord)sm ); + return sm; + } +} + + +/* ------------ LineF and LineZ related ------------ */ + +static void rcinc_LineF ( LineF* lineF ) { + UWord i; + tl_assert(lineF->inUse); + for (i = 0; i < N_LINE_ARANGE; i++) + rcinc(lineF->w64s[i]); +} + +static void rcdec_LineF ( LineF* lineF ) { + UWord i; + tl_assert(lineF->inUse); + for (i = 0; i < N_LINE_ARANGE; i++) + rcdec(lineF->w64s[i]); +} + +static void rcinc_LineZ ( LineZ* lineZ ) { + tl_assert(lineZ->dict[0] != SVal_INVALID); + rcinc(lineZ->dict[0]); + if (lineZ->dict[1] != SVal_INVALID) rcinc(lineZ->dict[1]); + if (lineZ->dict[2] != SVal_INVALID) rcinc(lineZ->dict[2]); + if (lineZ->dict[3] != SVal_INVALID) rcinc(lineZ->dict[3]); +} + +static void rcdec_LineZ ( LineZ* lineZ ) { + tl_assert(lineZ->dict[0] != SVal_INVALID); + rcdec(lineZ->dict[0]); + if (lineZ->dict[1] != SVal_INVALID) rcdec(lineZ->dict[1]); + if (lineZ->dict[2] != SVal_INVALID) rcdec(lineZ->dict[2]); + if (lineZ->dict[3] != SVal_INVALID) rcdec(lineZ->dict[3]); +} + +inline +static void write_twobit_array ( UChar* arr, UWord ix, UWord b2 ) { + Word bix, shft, mask, prep; + tl_assert(ix >= 0); + bix = ix >> 2; + shft = 2 * (ix & 3); /* 0, 2, 4 or 6 */ + mask = 3 << shft; + prep = b2 << shft; + arr[bix] = (arr[bix] & ~mask) | prep; +} + +inline +static UWord read_twobit_array ( UChar* arr, UWord ix ) { + Word bix, shft; + tl_assert(ix >= 0); + bix = ix >> 2; + shft = 2 * (ix & 3); /* 0, 2, 4 or 6 */ + return (arr[bix] >> shft) & 3; +} + +/* Given address 'tag', find either the Z or F line containing relevant + data, so it can be read into the cache. +*/ +static void find_ZF_for_reading ( /*OUT*/LineZ** zp, + /*OUT*/LineF** fp, Addr tag ) { + LineZ* lineZ; + LineF* lineF; + UWord zix; + SecMap* sm = shmem__find_or_alloc_SecMap(tag); + UWord smoff = shmem__get_SecMap_offset(tag); + /* since smoff is derived from a valid tag, it should be + cacheline-aligned. */ + tl_assert(0 == (smoff & (N_LINE_ARANGE - 1))); + zix = smoff >> N_LINE_BITS; + tl_assert(zix < N_SECMAP_ZLINES); + lineZ = &sm->linesZ[zix]; + lineF = NULL; + if (lineZ->dict[0] == SVal_INVALID) { + UInt fix = (UInt)lineZ->dict[1]; + tl_assert(sm->linesF); + tl_assert(sm->linesF_size > 0); + tl_assert(fix >= 0 && fix < sm->linesF_size); + lineF = &sm->linesF[fix]; + tl_assert(lineF->inUse); + lineZ = NULL; + } + *zp = lineZ; + *fp = lineF; +} + +/* Given address 'tag', return the relevant SecMap and the index of + the LineZ within it, in the expectation that the line is to be + overwritten. Regardless of whether 'tag' is currently associated + with a Z or F representation, to rcdec on the current + representation, in recognition of the fact that the contents are + just about to be overwritten. */ +static __attribute__((noinline)) +void find_Z_for_writing ( /*OUT*/SecMap** smp, + /*OUT*/Word* zixp, + Addr tag ) { + LineZ* lineZ; + LineF* lineF; + UWord zix; + SecMap* sm = shmem__find_or_alloc_SecMap(tag); + UWord smoff = shmem__get_SecMap_offset(tag); + /* since smoff is derived from a valid tag, it should be + cacheline-aligned. */ + tl_assert(0 == (smoff & (N_LINE_ARANGE - 1))); + zix = smoff >> N_LINE_BITS; + tl_assert(zix < N_SECMAP_ZLINES); + lineZ = &sm->linesZ[zix]; + lineF = NULL; + /* re RCs, we are freeing up this LineZ/LineF so that new data can + be parked in it. Hence have to rcdec it accordingly. */ + /* If lineZ has an associated lineF, free it up. */ + if (lineZ->dict[0] == SVal_INVALID) { + UInt fix = (UInt)lineZ->dict[1]; + tl_assert(sm->linesF); + tl_assert(sm->linesF_size > 0); + tl_assert(fix >= 0 && fix < sm->linesF_size); + lineF = &sm->linesF[fix]; + tl_assert(lineF->inUse); + rcdec_LineF(lineF); + lineF->inUse = False; + } else { + rcdec_LineZ(lineZ); + } + *smp = sm; + *zixp = zix; +} + +static __attribute__((noinline)) +void alloc_F_for_writing ( /*MOD*/SecMap* sm, /*OUT*/Word* fixp ) { + UInt i, new_size; + LineF* nyu; + + if (sm->linesF) { + tl_assert(sm->linesF_size > 0); + } else { + tl_assert(sm->linesF_size == 0); + } + + if (sm->linesF) { + for (i = 0; i < sm->linesF_size; i++) { + if (!sm->linesF[i].inUse) { + *fixp = (Word)i; + return; + } + } + } + + /* No free F line found. Expand existing array and try again. */ + new_size = sm->linesF_size==0 ? 1 : 2 * sm->linesF_size; + nyu = HG_(zalloc)( "libhb.aFfw.1 (LineF storage)", + new_size * sizeof(LineF) ); + tl_assert(nyu); + + stats__secmap_linesF_allocd += (new_size - sm->linesF_size); + stats__secmap_linesF_bytes += (new_size - sm->linesF_size) + * sizeof(LineF); + + if (0) + VG_(printf)("SM %p: expand F array from %d to %d\n", + sm, (Int)sm->linesF_size, new_size); + + for (i = 0; i < new_size; i++) + nyu[i].inUse = False; + + if (sm->linesF) { + for (i = 0; i < sm->linesF_size; i++) { + tl_assert(sm->linesF[i].inUse); + nyu[i] = sm->linesF[i]; + } + VG_(memset)(sm->linesF, 0, sm->linesF_size * sizeof(LineF) ); + HG_(free)(sm->linesF); + } + + sm->linesF = nyu; + sm->linesF_size = new_size; + + for (i = 0; i < sm->linesF_size; i++) { + if (!sm->linesF[i].inUse) { + *fixp = (Word)i; + return; + } + } + + /*NOTREACHED*/ + tl_assert(0); +} + + +/* ------------ CacheLine and implicit-tree related ------------ */ + +__attribute__((unused)) +static void pp_CacheLine ( CacheLine* cl ) { + Word i; + if (!cl) { + VG_(printf)("%s","pp_CacheLine(NULL)\n"); + return; + } + for (i = 0; i < N_LINE_TREES; i++) + VG_(printf)(" descr: %04lx\n", (UWord)cl->descrs[i]); + for (i = 0; i < N_LINE_ARANGE; i++) + VG_(printf)(" sval: %08lx\n", (UWord)cl->svals[i]); +} + +static UChar descr_to_validbits ( UShort descr ) +{ + /* a.k.a Party Time for gcc's constant folder */ +# define DESCR(b8_7, b8_6, b8_5, b8_4, b8_3, b8_2, b8_1, b8_0, \ + b16_3, b32_1, b16_2, b64, b16_1, b32_0, b16_0) \ + ( (UShort) ( ( (b8_7) << 14) | ( (b8_6) << 13) | \ + ( (b8_5) << 12) | ( (b8_4) << 11) | \ + ( (b8_3) << 10) | ( (b8_2) << 9) | \ + ( (b8_1) << 8) | ( (b8_0) << 7) | \ + ( (b16_3) << 6) | ( (b32_1) << 5) | \ + ( (b16_2) << 4) | ( (b64) << 3) | \ + ( (b16_1) << 2) | ( (b32_0) << 1) | \ + ( (b16_0) << 0) ) ) + +# define BYTE(bit7, bit6, bit5, bit4, bit3, bit2, bit1, bit0) \ + ( (UChar) ( ( (bit7) << 7) | ( (bit6) << 6) | \ + ( (bit5) << 5) | ( (bit4) << 4) | \ + ( (bit3) << 3) | ( (bit2) << 2) | \ + ( (bit1) << 1) | ( (bit0) << 0) ) ) + + /* these should all get folded out at compile time */ + tl_assert(DESCR(1,0,0,0,0,0,0,0, 0,0,0, 0, 0,0,0) == TREE_DESCR_8_7); + tl_assert(DESCR(0,0,0,0,0,0,0,1, 0,0,0, 0, 0,0,0) == TREE_DESCR_8_0); + tl_assert(DESCR(0,0,0,0,0,0,0,0, 1,0,0, 0, 0,0,0) == TREE_DESCR_16_3); + tl_assert(DESCR(0,0,0,0,0,0,0,0, 0,1,0, 0, 0,0,0) == TREE_DESCR_32_1); + tl_assert(DESCR(0,0,0,0,0,0,0,0, 0,0,1, 0, 0,0,0) == TREE_DESCR_16_2); + tl_assert(DESCR(0,0,0,0,0,0,0,0, 0,0,0, 1, 0,0,0) == TREE_DESCR_64); + tl_assert(DESCR(0,0,0,0,0,0,0,0, 0,0,0, 0, 1,0,0) == TREE_DESCR_16_1); + tl_assert(DESCR(0,0,0,0,0,0,0,0, 0,0,0, 0, 0,1,0) == TREE_DESCR_32_0); + tl_assert(DESCR(0,0,0,0,0,0,0,0, 0,0,0, 0, 0,0,1) == TREE_DESCR_16_0); + + switch (descr) { + /* + +--------------------------------- TREE_DESCR_8_7 + | +------------------- TREE_DESCR_8_0 + | | +---------------- TREE_DESCR_16_3 + | | | +-------------- TREE_DESCR_32_1 + | | | | +------------ TREE_DESCR_16_2 + | | | | | +--------- TREE_DESCR_64 + | | | | | | +------ TREE_DESCR_16_1 + | | | | | | | +---- TREE_DESCR_32_0 + | | | | | | | | +-- TREE_DESCR_16_0 + | | | | | | | | | + | | | | | | | | | GRANULARITY, 7 -> 0 */ + case DESCR(1,1,1,1,1,1,1,1, 0,0,0, 0, 0,0,0): /* 8 8 8 8 8 8 8 8 */ + return BYTE(1,1,1,1,1,1,1,1); + case DESCR(1,1,0,0,1,1,1,1, 0,0,1, 0, 0,0,0): /* 8 8 16 8 8 8 8 */ + return BYTE(1,1,0,1,1,1,1,1); + case DESCR(0,0,1,1,1,1,1,1, 1,0,0, 0, 0,0,0): /* 16 8 8 8 8 8 8 */ + return BYTE(0,1,1,1,1,1,1,1); + case DESCR(0,0,0,0,1,1,1,1, 1,0,1, 0, 0,0,0): /* 16 16 8 8 8 8 */ + return BYTE(0,1,0,1,1,1,1,1); + + case DESCR(1,1,1,1,1,1,0,0, 0,0,0, 0, 0,0,1): /* 8 8 8 8 8 8 16 */ + return BYTE(1,1,1,1,1,1,0,1); + case DESCR(1,1,0,0,1,1,0,0, 0,0,1, 0, 0,0,1): /* 8 8 16 8 8 16 */ + return BYTE(1,1,0,1,1,1,0,1); + case DESCR(0,0,1,1,1,1,0,0, 1,0,0, 0, 0,0,1): /* 16 8 8 8 8 16 */ + return BYTE(0,1,1,1,1,1,0,1); + case DESCR(0,0,0,0,1,1,0,0, 1,0,1, 0, 0,0,1): /* 16 16 8 8 16 */ + return BYTE(0,1,0,1,1,1,0,1); + + case DESCR(1,1,1,1,0,0,1,1, 0,0,0, 0, 1,0,0): /* 8 8 8 8 16 8 8 */ + return BYTE(1,1,1,1,0,1,1,1); + case DESCR(1,1,0,0,0,0,1,1, 0,0,1, 0, 1,0,0): /* 8 8 16 16 8 8 */ + return BYTE(1,1,0,1,0,1,1,1); + case DESCR(0,0,1,1,0,0,1,1, 1,0,0, 0, 1,0,0): /* 16 8 8 16 8 8 */ + return BYTE(0,1,1,1,0,1,1,1); + case DESCR(0,0,0,0,0,0,1,1, 1,0,1, 0, 1,0,0): /* 16 16 16 8 8 */ + return BYTE(0,1,0,1,0,1,1,1); + + case DESCR(1,1,1,1,0,0,0,0, 0,0,0, 0, 1,0,1): /* 8 8 8 8 16 16 */ + return BYTE(1,1,1,1,0,1,0,1); + case DESCR(1,1,0,0,0,0,0,0, 0,0,1, 0, 1,0,1): /* 8 8 16 16 16 */ + return BYTE(1,1,0,1,0,1,0,1); + case DESCR(0,0,1,1,0,0,0,0, 1,0,0, 0, 1,0,1): /* 16 8 8 16 16 */ + return BYTE(0,1,1,1,0,1,0,1); + case DESCR(0,0,0,0,0,0,0,0, 1,0,1, 0, 1,0,1): /* 16 16 16 16 */ + return BYTE(0,1,0,1,0,1,0,1); + + case DESCR(0,0,0,0,1,1,1,1, 0,1,0, 0, 0,0,0): /* 32 8 8 8 8 */ + return BYTE(0,0,0,1,1,1,1,1); + case DESCR(0,0,0,0,1,1,0,0, 0,1,0, 0, 0,0,1): /* 32 8 8 16 */ + return BYTE(0,0,0,1,1,1,0,1); + case DESCR(0,0,0,0,0,0,1,1, 0,1,0, 0, 1,0,0): /* 32 16 8 8 */ + return BYTE(0,0,0,1,0,1,1,1); + case DESCR(0,0,0,0,0,0,0,0, 0,1,0, 0, 1,0,1): /* 32 16 16 */ + return BYTE(0,0,0,1,0,1,0,1); + + case DESCR(1,1,1,1,0,0,0,0, 0,0,0, 0, 0,1,0): /* 8 8 8 8 32 */ + return BYTE(1,1,1,1,0,0,0,1); + case DESCR(1,1,0,0,0,0,0,0, 0,0,1, 0, 0,1,0): /* 8 8 16 32 */ + return BYTE(1,1,0,1,0,0,0,1); + case DESCR(0,0,1,1,0,0,0,0, 1,0,0, 0, 0,1,0): /* 16 8 8 32 */ + return BYTE(0,1,1,1,0,0,0,1); + case DESCR(0,0,0,0,0,0,0,0, 1,0,1, 0, 0,1,0): /* 16 16 32 */ + return BYTE(0,1,0,1,0,0,0,1); + + case DESCR(0,0,0,0,0,0,0,0, 0,1,0, 0, 0,1,0): /* 32 32 */ + return BYTE(0,0,0,1,0,0,0,1); + + case DESCR(0,0,0,0,0,0,0,0, 0,0,0, 1, 0,0,0): /* 64 */ + return BYTE(0,0,0,0,0,0,0,1); + + default: return BYTE(0,0,0,0,0,0,0,0); + /* INVALID - any valid descr produces at least one + valid bit in tree[0..7]*/ + } + /* NOTREACHED*/ + tl_assert(0); + +# undef DESCR +# undef BYTE +} + +__attribute__((unused)) +static Bool is_sane_Descr ( UShort descr ) { + return descr_to_validbits(descr) != 0; +} + +static void sprintf_Descr ( /*OUT*/HChar* dst, UShort descr ) { + VG_(sprintf)(dst, + "%d%d%d%d%d%d%d%d %d%d%d %d %d%d%d", + (Int)((descr & TREE_DESCR_8_7) ? 1 : 0), + (Int)((descr & TREE_DESCR_8_6) ? 1 : 0), + (Int)((descr & TREE_DESCR_8_5) ? 1 : 0), + (Int)((descr & TREE_DESCR_8_4) ? 1 : 0), + (Int)((descr & TREE_DESCR_8_3) ? 1 : 0), + (Int)((descr & TREE_DESCR_8_2) ? 1 : 0), + (Int)((descr & TREE_DESCR_8_1) ? 1 : 0), + (Int)((descr & TREE_DESCR_8_0) ? 1 : 0), + (Int)((descr & TREE_DESCR_16_3) ? 1 : 0), + (Int)((descr & TREE_DESCR_32_1) ? 1 : 0), + (Int)((descr & TREE_DESCR_16_2) ? 1 : 0), + (Int)((descr & TREE_DESCR_64) ? 1 : 0), + (Int)((descr & TREE_DESCR_16_1) ? 1 : 0), + (Int)((descr & TREE_DESCR_32_0) ? 1 : 0), + (Int)((descr & TREE_DESCR_16_0) ? 1 : 0) + ); +} +static void sprintf_Byte ( /*OUT*/HChar* dst, UChar byte ) { + VG_(sprintf)(dst, "%d%d%d%d%d%d%d%d", + (Int)((byte & 128) ? 1 : 0), + (Int)((byte & 64) ? 1 : 0), + (Int)((byte & 32) ? 1 : 0), + (Int)((byte & 16) ? 1 : 0), + (Int)((byte & 8) ? 1 : 0), + (Int)((byte & 4) ? 1 : 0), + (Int)((byte & 2) ? 1 : 0), + (Int)((byte & 1) ? 1 : 0) + ); +} + +static Bool is_sane_Descr_and_Tree ( UShort descr, SVal* tree ) { + Word i; + UChar validbits = descr_to_validbits(descr); + HChar buf[128], buf2[128]; + if (validbits == 0) + goto bad; + for (i = 0; i < 8; i++) { + if (validbits & (1<<i)) { + if (tree[i] == SVal_INVALID) + goto bad; + } else { + if (tree[i] != SVal_INVALID) + goto bad; + } + } + return True; + bad: + sprintf_Descr( buf, descr ); + sprintf_Byte( buf2, validbits ); + VG_(printf)("%s","is_sane_Descr_and_Tree: bad tree {\n"); + VG_(printf)(" validbits 0x%02lx %s\n", (UWord)validbits, buf2); + VG_(printf)(" descr 0x%04lx %s\n", (UWord)descr, buf); + for (i = 0; i < 8; i++) + VG_(printf)(" [%ld] 0x%016llx\n", i, tree[i]); + VG_(printf)("%s","}\n"); + return 0; +} + +static Bool is_sane_CacheLine ( CacheLine* cl ) +{ + Word tno, cloff; + + if (!cl) goto bad; + + for (tno = 0, cloff = 0; tno < N_LINE_TREES; tno++, cloff += 8) { + UShort descr = cl->descrs[tno]; + SVal* tree = &cl->svals[cloff]; + if (!is_sane_Descr_and_Tree(descr, tree)) + goto bad; + } + tl_assert(cloff == N_LINE_ARANGE); + return True; + bad: + pp_CacheLine(cl); + return False; +} + +static UShort normalise_tree ( /*MOD*/SVal* tree ) +{ + UShort descr; + /* pre: incoming tree[0..7] does not have any invalid shvals, in + particular no zeroes. */ + if (UNLIKELY(tree[7] == SVal_INVALID || tree[6] == SVal_INVALID + || tree[5] == SVal_INVALID || tree[4] == SVal_INVALID + || tree[3] == SVal_INVALID || tree[2] == SVal_INVALID + || tree[1] == SVal_INVALID || tree[0] == SVal_INVALID)) + tl_assert(0); + + descr = TREE_DESCR_8_7 | TREE_DESCR_8_6 | TREE_DESCR_8_5 + | TREE_DESCR_8_4 | TREE_DESCR_8_3 | TREE_DESCR_8_2 + | TREE_DESCR_8_1 | TREE_DESCR_8_0; + /* build 16-bit layer */ + if (tree[1] == tree[0]) { + tree[1] = SVal_INVALID; + descr &= ~(TREE_DESCR_8_1 | TREE_DESCR_8_0); + descr |= TREE_DESCR_16_0; + } + if (tree[3] == tree[2]) { + tree[3] = SVal_INVALID; + descr &= ~(TREE_DESCR_8_3 | TREE_DESCR_8_2); + descr |= TREE_DESCR_16_1; + } + if (tree[5] == tree[4]) { + tree[5] = SVal_INVALID; + descr &= ~(TREE_DESCR_8_5 | TREE_DESCR_8_4); + descr |= TREE_DESCR_16_2; + } + if (tree[7] == tree[6]) { + tree[7] = SVal_INVALID; + descr &= ~(TREE_DESCR_8_7 | TREE_DESCR_8_6); + descr |= TREE_DESCR_16_3; + } + /* build 32-bit layer */ + if (tree[2] == tree[0] + && (descr & TREE_DESCR_16_1) && (descr & TREE_DESCR_16_0)) { + tree[2] = SVal_INVALID; /* [3,1] must already be SVal_INVALID */ + descr &= ~(TREE_DESCR_16_1 | TREE_DESCR_16_0); + descr |= TREE_DESCR_32_0; + } + if (tree[6] == tree[4] + && (descr & TREE_DESCR_16_3) && (descr & TREE_DESCR_16_2)) { + tree[6] = SVal_INVALID; /* [7,5] must already be SVal_INVALID */ + descr &= ~(TREE_DESCR_16_3 | TREE_DESCR_16_2); + descr |= TREE_DESCR_32_1; + } + /* build 64-bit layer */ + if (tree[4] == tree[0] + && (descr & TREE_DESCR_32_1) && (descr & TREE_DESCR_32_0)) { + tree[4] = SVal_INVALID; /* [7,6,5,3,2,1] must already be SVal_INVALID */ + descr &= ~(TREE_DESCR_32_1 | TREE_DESCR_32_0); + descr |= TREE_DESCR_64; + } + return descr; +} + +/* This takes a cacheline where all the data is at the leaves + (w8[..]) and builds a correctly normalised tree. */ +static void normalise_CacheLine ( /*MOD*/CacheLine* cl ) +{ + Word tno, cloff; + for (tno = 0, cloff = 0; tno < N_LINE_TREES; tno++, cloff += 8) { + SVal* tree = &cl->svals[cloff]; + cl->descrs[tno] = normalise_tree( tree ); + } + tl_assert(cloff == N_LINE_ARANGE); + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + stats__cline_normalises++; +} + + +typedef struct { UChar count; SVal sval; } CountedSVal; + +static +void sequentialise_CacheLine ( /*OUT*/CountedSVal* dst, + /*OUT*/Word* dstUsedP, + Word nDst, CacheLine* src ) +{ + Word tno, cloff, dstUsed; + + tl_assert(nDst == N_LINE_ARANGE); + dstUsed = 0; + + for (tno = 0, cloff = 0; tno < N_LINE_TREES; tno++, cloff += 8) { + UShort descr = src->descrs[tno]; + SVal* tree = &src->svals[cloff]; + + /* sequentialise the tree described by (descr,tree). */ +# define PUT(_n,_v) \ + do { dst[dstUsed ].count = (_n); \ + dst[dstUsed++].sval = (_v); \ + } while (0) + + /* byte 0 */ + if (descr & TREE_DESCR_64) PUT(8, tree[0]); else + if (descr & TREE_DESCR_32_0) PUT(4, tree[0]); else + if (descr & TREE_DESCR_16_0) PUT(2, tree[0]); else + if (descr & TREE_DESCR_8_0) PUT(1, tree[0]); + /* byte 1 */ + if (descr & TREE_DESCR_8_1) PUT(1, tree[1]); + /* byte 2 */ + if (descr & TREE_DESCR_16_1) PUT(2, tree[2]); else + if (descr & TREE_DESCR_8_2) PUT(1, tree[2]); + /* byte 3 */ + if (descr & TREE_DESCR_8_3) PUT(1, tree[3]); + /* byte 4 */ + if (descr & TREE_DESCR_32_1) PUT(4, tree[4]); else + if (descr & TREE_DESCR_16_2) PUT(2, tree[4]); else + if (descr & TREE_DESCR_8_4) PUT(1, tree[4]); + /* byte 5 */ + if (descr & TREE_DESCR_8_5) PUT(1, tree[5]); + /* byte 6 */ + if (descr & TREE_DESCR_16_3) PUT(2, tree[6]); else + if (descr & TREE_DESCR_8_6) PUT(1, tree[6]); + /* byte 7 */ + if (descr & TREE_DESCR_8_7) PUT(1, tree[7]); + +# undef PUT + /* END sequentialise the tree described by (descr,tree). */ + + } + tl_assert(cloff == N_LINE_ARANGE); + tl_assert(dstUsed <= nDst); + + *dstUsedP = dstUsed; +} + +/* Write the cacheline 'wix' to backing store. Where it ends up + is determined by its tag field. */ +static __attribute__((noinline)) void cacheline_wback ( UWord wix ) +{ + Word i, j, k, m; + Addr tag; + SecMap* sm; + CacheLine* cl; + LineZ* lineZ; + LineF* lineF; + Word zix, fix, csvalsUsed; + CountedSVal csvals[N_LINE_ARANGE]; + SVal sv; + + if (0) + VG_(printf)("scache wback line %d\n", (Int)wix); + + tl_assert(wix >= 0 && wix < N_WAY_NENT); + + tag = cache_shmem.tags0[wix]; + cl = &cache_shmem.lyns0[wix]; + + /* The cache line may have been invalidated; if so, ignore it. */ + if (!is_valid_scache_tag(tag)) + return; + + /* Where are we going to put it? */ + sm = NULL; + lineZ = NULL; + lineF = NULL; + zix = fix = -1; + + /* find the Z line to write in and rcdec it or the associated F + line. */ + find_Z_for_writing( &sm, &zix, tag ); + + tl_assert(sm); + tl_assert(zix >= 0 && zix < N_SECMAP_ZLINES); + lineZ = &sm->linesZ[zix]; + + /* Generate the data to be stored */ + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + + csvalsUsed = -1; + sequentialise_CacheLine( csvals, &csvalsUsed, + N_LINE_ARANGE, cl ); + tl_assert(csvalsUsed >= 1 && csvalsUsed <= N_LINE_ARANGE); + if (0) VG_(printf)("%lu ", csvalsUsed); + + lineZ->dict[0] = lineZ->dict[1] + = lineZ->dict[2] = lineZ->dict[3] = SVal_INVALID; + + /* i indexes actual shadow values, k is cursor in csvals */ + i = 0; + for (k = 0; k < csvalsUsed; k++) { + + sv = csvals[k].sval; + if (CHECK_ZSM) + tl_assert(csvals[k].count >= 1 && csvals[k].count <= 8); + /* do we already have it? */ + if (sv == lineZ->dict[0]) { j = 0; goto dict_ok; } + if (sv == lineZ->dict[1]) { j = 1; goto dict_ok; } + if (sv == lineZ->dict[2]) { j = 2; goto dict_ok; } + if (sv == lineZ->dict[3]) { j = 3; goto dict_ok; } + /* no. look for a free slot. */ + if (CHECK_ZSM) + tl_assert(sv != SVal_INVALID); + if (lineZ->dict[0] + == SVal_INVALID) { lineZ->dict[0] = sv; j = 0; goto dict_ok; } + if (lineZ->dict[1] + == SVal_INVALID) { lineZ->dict[1] = sv; j = 1; goto dict_ok; } + if (lineZ->dict[2] + == SVal_INVALID) { lineZ->dict[2] = sv; j = 2; goto dict_ok; } + if (lineZ->dict[3] + == SVal_INVALID) { lineZ->dict[3] = sv; j = 3; goto dict_ok; } + break; /* we'll have to use the f rep */ + dict_ok: + m = csvals[k].count; + if (m == 8) { + write_twobit_array( lineZ->ix2s, i+0, j ); + write_twobit_array( lineZ->ix2s, i+1, j ); + write_twobit_array( lineZ->ix2s, i+2, j ); + write_twobit_array( lineZ->ix2s, i+3, j ); + write_twobit_array( lineZ->ix2s, i+4, j ); + write_twobit_array( lineZ->ix2s, i+5, j ); + write_twobit_array( lineZ->ix2s, i+6, j ); + write_twobit_array( lineZ->ix2s, i+7, j ); + i += 8; + } + else if (m == 4) { + write_twobit_array( lineZ->ix2s, i+0, j ); + write_twobit_array( lineZ->ix2s, i+1, j ); + write_twobit_array( lineZ->ix2s, i+2, j ); + write_twobit_array( lineZ->ix2s, i+3, j ); + i += 4; + } + else if (m == 1) { + write_twobit_array( lineZ->ix2s, i+0, j ); + i += 1; + } + else if (m == 2) { + write_twobit_array( lineZ->ix2s, i+0, j ); + write_twobit_array( lineZ->ix2s, i+1, j ); + i += 2; + } + else { + tl_assert(0); /* 8 4 2 or 1 are the only legitimate values for m */ + } + + } + + if (LIKELY(i == N_LINE_ARANGE)) { + /* Construction of the compressed representation was + successful. */ + rcinc_LineZ(lineZ); + stats__cache_Z_wbacks++; + } else { + /* Cannot use the compressed(z) representation. Use the full(f) + rep instead. */ + tl_assert(i >= 0 && i < N_LINE_ARANGE); + alloc_F_for_writing( sm, &fix ); + tl_assert(sm->linesF); + tl_assert(sm->linesF_size > 0); + tl_assert(fix >= 0 && fix < (Word)sm->linesF_size); + lineF = &sm->linesF[fix]; + tl_assert(!lineF->inUse); + lineZ->dict[0] = lineZ->dict[2] = lineZ->dict[3] = SVal_INVALID; + lineZ->dict[1] = (SVal)fix; + lineF->inUse = True; + i = 0; + for (k = 0; k < csvalsUsed; k++) { + if (CHECK_ZSM) + tl_assert(csvals[k].count >= 1 && csvals[k].count <= 8); + sv = csvals[k].sval; + if (CHECK_ZSM) + tl_assert(sv != SVal_INVALID); + for (m = csvals[k].count; m > 0; m--) { + lineF->w64s[i] = sv; + i++; + } + } + tl_assert(i == N_LINE_ARANGE); + rcinc_LineF(lineF); + stats__cache_F_wbacks++; + } +} + +/* Fetch the cacheline 'wix' from the backing store. The tag + associated with 'wix' is assumed to have already been filled in; + hence that is used to determine where in the backing store to read + from. */ +static __attribute__((noinline)) void cacheline_fetch ( UWord wix ) +{ + Word i; + Addr tag; + CacheLine* cl; + LineZ* lineZ; + LineF* lineF; + + if (0) + VG_(printf)("scache fetch line %d\n", (Int)wix); + + tl_assert(wix >= 0 && wix < N_WAY_NENT); + + tag = cache_shmem.tags0[wix]; + cl = &cache_shmem.lyns0[wix]; + + /* reject nonsense requests */ + tl_assert(is_valid_scache_tag(tag)); + + lineZ = NULL; + lineF = NULL; + find_ZF_for_reading( &lineZ, &lineF, tag ); + tl_assert( (lineZ && !lineF) || (!lineZ && lineF) ); + + /* expand the data into the bottom layer of the tree, then get + cacheline_normalise to build the descriptor array. */ + if (lineF) { + tl_assert(lineF->inUse); + for (i = 0; i < N_LINE_ARANGE; i++) { + cl->svals[i] = lineF->w64s[i]; + } + stats__cache_F_fetches++; + } else { + for (i = 0; i < N_LINE_ARANGE; i++) { + SVal sv; + UWord ix = read_twobit_array( lineZ->ix2s, i ); + /* correct, but expensive: tl_assert(ix >= 0 && ix <= 3); */ + sv = lineZ->dict[ix]; + tl_assert(sv != SVal_INVALID); + cl->svals[i] = sv; + } + stats__cache_Z_fetches++; + } + normalise_CacheLine( cl ); +} + +static void shmem__invalidate_scache ( void ) { + Word wix; + if (0) VG_(printf)("%s","scache inval\n"); + tl_assert(!is_valid_scache_tag(1)); + for (wix = 0; wix < N_WAY_NENT; wix++) { + cache_shmem.tags0[wix] = 1/*INVALID*/; + } + stats__cache_invals++; +} + +static void shmem__flush_and_invalidate_scache ( void ) { + Word wix; + Addr tag; + if (0) VG_(printf)("%s","scache flush and invalidate\n"); + tl_assert(!is_valid_scache_tag(1)); + for (wix = 0; wix < N_WAY_NENT; wix++) { + tag = cache_shmem.tags0[wix]; + if (tag == 1/*INVALID*/) { + /* already invalid; nothing to do */ + } else { + tl_assert(is_valid_scache_tag(tag)); + cacheline_wback( wix ); + } + cache_shmem.tags0[wix] = 1/*INVALID*/; + } + stats__cache_flushes++; + stats__cache_invals++; +} + + +static inline Bool aligned16 ( Addr a ) { + return 0 == (a & 1); +} +static inline Bool aligned32 ( Addr a ) { + return 0 == (a & 3); +} +static inline Bool aligned64 ( Addr a ) { + return 0 == (a & 7); +} +static inline UWord get_cacheline_offset ( Addr a ) { + return (UWord)(a & (N_LINE_ARANGE - 1)); +} +static inline Addr cacheline_ROUNDUP ( Addr a ) { + return ROUNDUP(a, N_LINE_ARANGE); +} +static inline Addr cacheline_ROUNDDN ( Addr a ) { + return ROUNDDN(a, N_LINE_ARANGE); +} +static inline UWord get_treeno ( Addr a ) { + return get_cacheline_offset(a) >> 3; +} +static inline UWord get_tree_offset ( Addr a ) { + return a & 7; +} + +static __attribute__((noinline)) + CacheLine* get_cacheline_MISS ( Addr a ); /* fwds */ +static inline CacheLine* get_cacheline ( Addr a ) +{ + /* tag is 'a' with the in-line offset masked out, + eg a[31]..a[4] 0000 */ + Addr tag = a & ~(N_LINE_ARANGE - 1); + UWord wix = (a >> N_LINE_BITS) & (N_WAY_NENT - 1); + stats__cache_totrefs++; + if (LIKELY(tag == cache_shmem.tags0[wix])) { + return &cache_shmem.lyns0[wix]; + } else { + return get_cacheline_MISS( a ); + } +} + +static __attribute__((noinline)) + CacheLine* get_cacheline_MISS ( Addr a ) +{ + /* tag is 'a' with the in-line offset masked out, + eg a[31]..a[4] 0000 */ + + CacheLine* cl; + Addr* tag_old_p; + Addr tag = a & ~(N_LINE_ARANGE - 1); + UWord wix = (a >> N_LINE_BITS) & (N_WAY_NENT - 1); + + tl_assert(tag != cache_shmem.tags0[wix]); + + /* Dump the old line into the backing store. */ + stats__cache_totmisses++; + + cl = &cache_shmem.lyns0[wix]; + tag_old_p = &cache_shmem.tags0[wix]; + + if (is_valid_scache_tag( *tag_old_p )) { + /* EXPENSIVE and REDUNDANT: callee does it */ + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + cacheline_wback( wix ); + } + /* and reload the new one */ + *tag_old_p = tag; + cacheline_fetch( wix ); + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + return cl; +} + +static UShort pulldown_to_32 ( /*MOD*/SVal* tree, UWord toff, UShort descr ) { + stats__cline_64to32pulldown++; + switch (toff) { + case 0: case 4: + tl_assert(descr & TREE_DESCR_64); + tree[4] = tree[0]; + descr &= ~TREE_DESCR_64; + descr |= (TREE_DESCR_32_1 | TREE_DESCR_32_0); + break; + default: + tl_assert(0); + } + return descr; +} + +static UShort pulldown_to_16 ( /*MOD*/SVal* tree, UWord toff, UShort descr ) { + stats__cline_32to16pulldown++; + switch (toff) { + case 0: case 2: + if (!(descr & TREE_DESCR_32_0)) { + descr = pulldown_to_32(tree, 0, descr); + } + tl_assert(descr & TREE_DESCR_32_0); + tree[2] = tree[0]; + descr &= ~TREE_DESCR_32_0; + descr |= (TREE_DESCR_16_1 | TREE_DESCR_16_0); + break; + case 4: case 6: + if (!(descr & TREE_DESCR_32_1)) { + descr = pulldown_to_32(tree, 4, descr); + } + tl_assert(descr & TREE_DESCR_32_1); + tree[6] = tree[4]; + descr &= ~TREE_DESCR_32_1; + descr |= (TREE_DESCR_16_3 | TREE_DESCR_16_2); + break; + default: + tl_assert(0); + } + return descr; +} + +static UShort pulldown_to_8 ( /*MOD*/SVal* tree, UWord toff, UShort descr ) { + stats__cline_16to8pulldown++; + switch (toff) { + case 0: case 1: + if (!(descr & TREE_DESCR_16_0)) { + descr = pulldown_to_16(tree, 0, descr); + } + tl_assert(descr & TREE_DESCR_16_0); + tree[1] = tree[0]; + descr &= ~TREE_DESCR_16_0; + descr |= (TREE_DESCR_8_1 | TREE_DESCR_8_0); + break; + case 2: case 3: + if (!(descr & TREE_DESCR_16_1)) { + descr = pulldown_to_16(tree, 2, descr); + } + tl_assert(descr & TREE_DESCR_16_1); + tree[3] = tree[2]; + descr &= ~TREE_DESCR_16_1; + descr |= (TREE_DESCR_8_3 | TREE_DESCR_8_2); + break; + case 4: case 5: + if (!(descr & TREE_DESCR_16_2)) { + descr = pulldown_to_16(tree, 4, descr); + } + tl_assert(descr & TREE_DESCR_16_2); + tree[5] = tree[4]; + descr &= ~TREE_DESCR_16_2; + descr |= (TREE_DESCR_8_5 | TREE_DESCR_8_4); + break; + case 6: case 7: + if (!(descr & TREE_DESCR_16_3)) { + descr = pulldown_to_16(tree, 6, descr); + } + tl_assert(descr & TREE_DESCR_16_3); + tree[7] = tree[6]; + descr &= ~TREE_DESCR_16_3; + descr |= (TREE_DESCR_8_7 | TREE_DESCR_8_6); + break; + default: + tl_assert(0); + } + return descr; +} + + +static UShort pullup_descr_to_16 ( UShort descr, UWord toff ) { + UShort mask; + switch (toff) { + case 0: + mask = TREE_DESCR_8_1 | TREE_DESCR_8_0; + tl_assert( (descr & mask) == mask ); + descr &= ~mask; + descr |= TREE_DESCR_16_0; + break; + case 2: + mask = TREE_DESCR_8_3 | TREE_DESCR_8_2; + tl_assert( (descr & mask) == mask ); + descr &= ~mask; + descr |= TREE_DESCR_16_1; + break; + case 4: + mask = TREE_DESCR_8_5 | TREE_DESCR_8_4; + tl_assert( (descr & mask) == mask ); + descr &= ~mask; + descr |= TREE_DESCR_16_2; + break; + case 6: + mask = TREE_DESCR_8_7 | TREE_DESCR_8_6; + tl_assert( (descr & mask) == mask ); + descr &= ~mask; + descr |= TREE_DESCR_16_3; + break; + default: + tl_assert(0); + } + return descr; +} + +static UShort pullup_descr_to_32 ( UShort descr, UWord toff ) { + UShort mask; + switch (toff) { + case 0: + if (!(descr & TREE_DESCR_16_0)) + descr = pullup_descr_to_16(descr, 0); + if (!(descr & TREE_DESCR_16_1)) + descr = pullup_descr_to_16(descr, 2); + mask = TREE_DESCR_16_1 | TREE_DESCR_16_0; + tl_assert( (descr & mask) == mask ); + descr &= ~mask; + descr |= TREE_DESCR_32_0; + break; + case 4: + if (!(descr & TREE_DESCR_16_2)) + descr = pullup_descr_to_16(descr, 4); + if (!(descr & TREE_DESCR_16_3)) + descr = pullup_descr_to_16(descr, 6); + mask = TREE_DESCR_16_3 | TREE_DESCR_16_2; + tl_assert( (descr & mask) == mask ); + descr &= ~mask; + descr |= TREE_DESCR_32_1; + break; + default: + tl_assert(0); + } + return descr; +} + +static Bool valid_value_is_above_me_32 ( UShort descr, UWord toff ) { + switch (toff) { + case 0: case 4: + return 0 != (descr & TREE_DESCR_64); + default: + tl_assert(0); + } +} + +static Bool valid_value_is_below_me_16 ( UShort descr, UWord toff ) { + switch (toff) { + case 0: + return 0 != (descr & (TREE_DESCR_8_1 | TREE_DESCR_8_0)); + case 2: + return 0 != (descr & (TREE_DESCR_8_3 | TREE_DESCR_8_2)); + case 4: + return 0 != (descr & (TREE_DESCR_8_5 | TREE_DESCR_8_4)); + case 6: + return 0 != (descr & (TREE_DESCR_8_7 | TREE_DESCR_8_6)); + default: + tl_assert(0); + } +} + +/* ------------ Cache management ------------ */ + +static void zsm_flush_cache ( void ) +{ + shmem__flush_and_invalidate_scache(); +} + + +static void zsm_init ( void(*p_rcinc)(SVal), void(*p_rcdec)(SVal) ) +{ + tl_assert( sizeof(UWord) == sizeof(Addr) ); + + rcinc = p_rcinc; + rcdec = p_rcdec; + + tl_assert(map_shmem == NULL); + map_shmem = VG_(newFM)( HG_(zalloc), "libhb.zsm_init.1 (map_shmem)", + HG_(free), + NULL/*unboxed UWord cmp*/); + tl_assert(map_shmem != NULL); + shmem__invalidate_scache(); + + /* a SecMap must contain an integral number of CacheLines */ + tl_assert(0 == (N_SECMAP_ARANGE % N_LINE_ARANGE)); + /* also ... a CacheLine holds an integral number of trees */ + tl_assert(0 == (N_LINE_ARANGE % 8)); +} + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// SECTION END compressed shadow memory // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + + + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// SECTION BEGIN vts primitives // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + +#ifndef __HB_VTS_H +#define __HB_VTS_H + +/* VtsIDs can't exceed 30 bits, since they have to be packed into the + lowest 30 bits of an SVal. */ +typedef UInt VtsID; +#define VtsID_INVALID 0xFFFFFFFF + +/* A VTS contains .ts, its vector clock, and also .id, a field to hold + a backlink for the caller's convenience. Since we have no idea + what to set that to in the library, it always gets set to + VtsID_INVALID. */ +typedef + struct { + VtsID id; + XArray* ts; /* XArray* ScalarTS(abstract) */ + } + VTS; + + +/* Create a new, empty VTS. */ +VTS* VTS__new ( void ); + +/* Delete this VTS in its entirety. */ +void VTS__delete ( VTS* vts ); + +/* Create a new singleton VTS. */ +VTS* VTS__singleton ( Thr* thr, ULong tym ); + +/* Return a new VTS in which vts[me]++, so to speak. 'vts' itself is + not modified. */ +VTS* VTS__tick ( Thr* me, VTS* vts ); + +/* Return a new VTS constructed as the join (max) of the 2 args. + Neither arg is modified. */ +VTS* VTS__join ( VTS* a, VTS* b ); + +/* Compute the partial ordering relation of the two args. */ +typedef + enum { POrd_EQ=4, POrd_LT, POrd_GT, POrd_UN } + POrd; + +POrd VTS__cmp ( VTS* a, VTS* b ); + +/* Compute an arbitrary structural (total) ordering on the two args, + based on their VCs, so they can be looked up in a table, tree, etc. + Returns -1, 0 or 1. */ +Word VTS__cmp_structural ( VTS* a, VTS* b ); + +/* Debugging only. Display the given VTS in the buffer. */ +void VTS__show ( HChar* buf, Int nBuf, VTS* vts ); + +/* Debugging only. Return vts[index], so to speak. */ +ULong VTS__indexAt_SLOW ( VTS* vts, Thr* idx ); + +#endif /* ! __HB_VTS_H */ + + +/*--------------- to do with Vector Timestamps ---------------*/ + +/* Scalar Timestamp */ +typedef + struct { + Thr* thr; + ULong tym; + } + ScalarTS; + + +static Bool is_sane_VTS ( VTS* vts ) +{ + UWord i, n; + ScalarTS *st1, *st2; + if (!vts) return False; + if (!vts->ts) return False; + n = VG_(sizeXA)( vts->ts ); + if (n >= 2) { + for (i = 0; i < n-1; i++) { + st1 = VG_(indexXA)( vts->ts, i ); + st2 = VG_(indexXA)( vts->ts, i+1 ); + if (st1->thr >= st2->thr) + return False; + if (st1->tym == 0 || st2->tym == 0) + return False; + } + } + return True; +} + + +/* Create a new, empty VTS. +*/ +VTS* VTS__new ( void ) +{ + VTS* vts; + vts = HG_(zalloc)( "libhb.VTS__new.1", sizeof(VTS) ); + tl_assert(vts); + vts->id = VtsID_INVALID; + vts->ts = VG_(newXA)( HG_(zalloc), "libhb.VTS__new.2", + HG_(free), sizeof(ScalarTS) ); + tl_assert(vts->ts); + return vts; +} + + +/* Delete this VTS in its entirety. +*/ +void VTS__delete ( VTS* vts ) +{ + tl_assert(vts); + tl_assert(vts->ts); + VG_(deleteXA)( vts->ts ); + HG_(free)(vts); +} + + +/* Create a new singleton VTS. +*/ +VTS* VTS__singleton ( Thr* thr, ULong tym ) { + ScalarTS st; + VTS* vts; + tl_assert(thr); + tl_assert(tym >= 1); + vts = VTS__new(); + st.thr = thr; + st.tym = tym; + VG_(addToXA)( vts->ts, &st ); + return vts; +} + + +/* Return a new VTS in which vts[me]++, so to speak. 'vts' itself is + not modified. +*/ +VTS* VTS__tick ( Thr* me, VTS* vts ) +{ + ScalarTS* here = NULL; + ScalarTS tmp; + VTS* res; + Word i, n; + tl_assert(me); + tl_assert(is_sane_VTS(vts)); + //if (0) VG_(printf)("tick vts thrno %ld szin %d\n", + // (Word)me->errmsg_index, (Int)VG_(sizeXA)(vts) ); + res = VTS__new(); + n = VG_(sizeXA)( vts->ts ); + + /* main loop doesn't handle zero-entry case correctly, so + special-case it. */ + if (n == 0) { + tmp.thr = me; + tmp.tym = 1; + VG_(addToXA)( res->ts, &tmp ); + tl_assert(is_sane_VTS(res)); + return res; + } + + for (i = 0; i < n; i++) { + here = VG_(indexXA)( vts->ts, i ); + if (me < here->thr) { + /* We just went past 'me', without seeing it. */ + tmp.thr = me; + tmp.tym = 1; + VG_(addToXA)( res->ts, &tmp ); + tmp = *here; + VG_(addToXA)( res->ts, &tmp ); + i++; + break; + } + else if (me == here->thr) { + tmp = *here; + tmp.tym++; + VG_(addToXA)( res->ts, &tmp ); + i++; + break; + } + else /* me > here->thr */ { + tmp = *here; + VG_(addToXA)( res->ts, &tmp ); + } + } + tl_assert(i >= 0 && i <= n); + if (i == n && here && here->thr < me) { + tmp.thr = me; + tmp.tym = 1; + VG_(addToXA)( res->ts, &tmp ); + } else { + for (/*keepgoing*/; i < n; i++) { + here = VG_(indexXA)( vts->ts, i ); + tmp = *here; + VG_(addToXA)( res->ts, &tmp ); + } + } + tl_assert(is_sane_VTS(res)); + //if (0) VG_(printf)("tick vts thrno %ld szou %d\n", + // (Word)me->errmsg_index, (Int)VG_(sizeXA)(res) ); + return res; +} + + +/* Return a new VTS constructed as the join (max) of the 2 args. + Neither arg is modified. +*/ +VTS* VTS__join ( VTS* a, VTS* b ) +{ + Word ia, ib, useda, usedb; + ULong tyma, tymb, tymMax; + Thr* thr; + VTS* res; + + tl_assert(a && a->ts); + tl_assert(b && b->ts); + useda = VG_(sizeXA)( a->ts ); + usedb = VG_(sizeXA)( b->ts ); + + res = VTS__new(); + ia = ib = 0; + + while (1) { + + /* This logic is to enumerate triples (thr, tyma, tymb) drawn + from a and b in order, where thr is the next Thr* + occurring in either a or b, and tyma/b are the relevant + scalar timestamps, taking into account implicit zeroes. */ + tl_assert(ia >= 0 && ia <= useda); + tl_assert(ib >= 0 && ib <= usedb); + + if (ia == useda && ib == usedb) { + /* both empty - done */ + break; + + } else if (ia == useda && ib != usedb) { + /* a empty, use up b */ + ScalarTS* tmpb = VG_(indexXA)( b->ts, ib ); + thr = tmpb->thr; + tyma = 0; + tymb = tmpb->tym; + ib++; + + } else if (ia != useda && ib == usedb) { + /* b empty, use up a */ + ScalarTS* tmpa = VG_(indexXA)( a->ts, ia ); + thr = tmpa->thr; + tyma = tmpa->tym; + tymb = 0; + ia++; + + } else { + /* both not empty; extract lowest-Thr*'d triple */ + ScalarTS* tmpa = VG_(indexXA)( a->ts, ia ); + ScalarTS* tmpb = VG_(indexXA)( b->ts, ib ); + if (tmpa->thr < tmpb->thr) { + /* a has the lowest unconsidered Thr* */ + thr = tmpa->thr; + tyma = tmpa->tym; + tymb = 0; + ia++; + } else if (tmpa->thr > tmpb->thr) { + /* b has the lowest unconsidered Thr* */ + thr = tmpb->thr; + tyma = 0; + tymb = tmpb->tym; + ib++; + } else { + /* they both next mention the same Thr* */ + tl_assert(tmpa->thr == tmpb->thr); + thr = tmpa->thr; /* == tmpb->thr */ + tyma = tmpa->tym; + tymb = tmpb->tym; + ia++; + ib++; + } + } + + /* having laboriously determined (thr, tyma, tymb), do something + useful with it. */ + tymMax = tyma > tymb ? tyma : tymb; + if (tymMax > 0) { + ScalarTS st; + st.thr = thr; + st.tym = tymMax; + VG_(addToXA)( res->ts, &st ); + } + + } + + tl_assert(is_sane_VTS( res )); + + return res; +} + + +/* Compute the partial ordering relation of the two args. +*/ +POrd VTS__cmp ( VTS* a, VTS* b ) +{ + Word ia, ib, useda, usedb; + ULong tyma, tymb; + + Bool all_leq = True; + Bool all_geq = True; + + tl_assert(a && a->ts); + tl_assert(b && b->ts); + useda = VG_(sizeXA)( a->ts ); + usedb = VG_(sizeXA)( b->ts ); + + ia = ib = 0; + + while (1) { + + /* This logic is to enumerate doubles (tyma, tymb) drawn + from a and b in order, and tyma/b are the relevant + scalar timestamps, taking into account implicit zeroes. */ + tl_assert(ia >= 0 && ia <= useda); + tl_assert(ib >= 0 && ib <= usedb); + + if (ia == useda && ib == usedb) { + /* both empty - done */ + break; + + } else if (ia == useda && ib != usedb) { + /* a empty, use up b */ + ScalarTS* tmpb = VG_(indexXA)( b->ts, ib ); + tyma = 0; + tymb = tmpb->tym; + ib++; + + } else if (ia != useda && ib == usedb) { + /* b empty, use up a */ + ScalarTS* tmpa = VG_(indexXA)( a->ts, ia ); + tyma = tmpa->tym; + tymb = 0; + ia++; + + } else { + /* both not empty; extract lowest-Thr*'d triple */ + ScalarTS* tmpa = VG_(indexXA)( a->ts, ia ); + ScalarTS* tmpb = VG_(indexXA)( b->ts, ib ); + if (tmpa->thr < tmpb->thr) { + /* a has the lowest unconsidered Thr* */ + tyma = tmpa->tym; + tymb = 0; + ia++; + } + else + if (tmpa->thr > tmpb->thr) { + /* b has the lowest unconsidered Thr* */ + tyma = 0; + tymb = tmpb->tym; + ib++; + } else { + /* they both next mention the same Thr* */ + tl_assert(tmpa->thr == tmpb->thr); + tyma = tmpa->tym; + tymb = tmpb->tym; + ia++; + ib++; + } + } + + /* having laboriously determined (tyma, tymb), do something + useful with it. */ + if (tyma < tymb) + all_geq = False; + if (tyma > tymb) + all_leq = False; + } + + if (all_leq && all_geq) + return POrd_EQ; + /* now we know they aren't equal, so either all_leq or all_geq or + both are false. */ + if (all_leq) + return POrd_LT; + if (all_geq) + return POrd_GT; + /* hmm, neither all_geq or all_leq. This means unordered. */ + return POrd_UN; +} + + +/* Compute an arbitrary structural (total) ordering on the two args, + based on their VCs, so they can be looked up in a table, tree, etc. + Returns -1, 0 or 1. (really just 'deriving Ord' :-) +*/ +Word VTS__cmp_structural ( VTS* a, VTS* b ) +{ + /* We just need to generate an arbitrary total ordering based on + a->ts and b->ts. Preferably do it in a way which comes across likely + differences relatively quickly. */ + Word i, useda, usedb; + ScalarTS *tmpa, *tmpb; + + tl_assert(a && a->ts); + tl_assert(b && b->ts); + useda = VG_(sizeXA)( a->ts ); + usedb = VG_(sizeXA)( b->ts ); + + if (useda < usedb) return -1; + if (useda > usedb) return 1; + + /* Same length vectors, so let's step through them together. */ + tl_assert(useda == usedb); + for (i = 0; i < useda; i++) { + tmpa = VG_(indexXA)( a->ts, i ); + tmpb = VG_(indexXA)( b->ts, i ); + if (tmpa->tym < tmpb->tym) return -1; + if (tmpa->tym > tmpb->tym) return 1; + if (tmpa->thr < tmpb->thr) return -1; + if (tmpa->thr > tmpb->thr) return 1; + } + + /* They're identical. */ + return 0; +} + + +/* Debugging only. Display the given VTS in the buffer. +*/ +void VTS__show ( HChar* buf, Int nBuf, VTS* vts ) { + ScalarTS* st; + HChar unit[64]; + Word i, n; + Int avail = nBuf; + tl_assert(vts && vts->ts); + tl_assert(nBuf > 16); + buf[0] = '['; + buf[1] = 0; + n = VG_(sizeXA)( vts->ts ); + for (i = 0; i < n; i++) { + tl_assert(avail >= 40); + st = VG_(indexXA)( vts->ts, i ); + VG_(memset)(unit, 0, sizeof(unit)); + VG_(sprintf)(unit, i < n-1 ? "%p:%lld " : "%p:%lld", + st->thr, st->tym); + if (avail < VG_(strlen)(unit) + 40/*let's say*/) { + VG_(strcat)(buf, " ...]"); + buf[nBuf-1] = 0; + return; + } + VG_(strcat)(buf, unit); + avail -= VG_(strlen)(unit); + } + VG_(strcat)(buf, "]"); + buf[nBuf-1] = 0; +} + + +/* Debugging only. Return vts[index], so to speak. +*/ +ULong VTS__indexAt_SLOW ( VTS* vts, Thr* idx ) { + UWord i, n; + tl_assert(vts && vts->ts); + n = VG_(sizeXA)( vts->ts ); + for (i = 0; i < n; i++) { + ScalarTS* st = VG_(indexXA)( vts->ts, i ); + if (st->thr == idx) + return st->tym; + } + return 0; +} + + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// SECTION END vts primitives // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + + + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// SECTION BEGIN main library // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////// +// // +// VTS set // +// // +///////////////////////////////////////////////////////// + +static WordFM* /* VTS* void void */ vts_set = NULL; + +static void vts_set_init ( void ) +{ + tl_assert(!vts_set); + vts_set = VG_(newFM)( HG_(zalloc), "libhb.vts_set_init.1", + HG_(free), + (Word(*)(UWord,UWord))VTS__cmp_structural ); + tl_assert(vts_set); +} + +/* Given a newly made VTS, look in vts_set to see if we already have + an identical one. If yes, free up this one and return instead a + pointer to the existing one. If no, add this one to the set and + return the same pointer. Caller differentiates the two cases by + comparing returned pointer with the supplied one (although that + does require that the supplied VTS is not already in the set). +*/ +static VTS* vts_set__find_and_dealloc__or_add ( VTS* cand ) +{ + UWord keyW, valW; + /* lookup cand (by value) */ + if (VG_(lookupFM)( vts_set, &keyW, &valW, (UWord)cand )) { + /* found it */ + tl_assert(valW == 0); + /* if this fails, cand (by ref) was already present (!) */ + tl_assert(keyW != (UWord)cand); + VTS__delete(cand); + return (VTS*)keyW; + } else { + /* not present. Add and return pointer to same. */ + VG_(addToFM)( vts_set, (UWord)cand, 0/*val is unused*/ ); + return cand; + } +} + + +///////////////////////////////////////////////////////// +// // +// VTS table // +// // +///////////////////////////////////////////////////////// + +static void VtsID__invalidate_caches ( void ); /* fwds */ + +/* A type to hold VTS table entries. Invariants: + If .vts == NULL, then this entry is not in use, so: + - .rc == 0 + - this entry is on the freelist (unfortunately, does not imply + any constraints on value for .nextfree) + If .vts != NULL, then this entry is in use: + - .vts is findable in vts_set + - .vts->id == this entry number + - no specific value for .rc (even 0 is OK) + - this entry is not on freelist, so .nextfree == VtsID_INVALID +*/ +typedef + struct { + VTS* vts; /* vts, in vts_set */ + UWord rc; /* reference count - enough for entire aspace */ + VtsID freelink; /* chain for free entries, VtsID_INVALID at end */ + } + VtsTE; + +/* The VTS table. */ +static XArray* /* of VtsTE */ vts_tab = NULL; + +/* An index into the VTS table, indicating the start of the list of + free (available for use) entries. If the list is empty, this is + VtsID_INVALID. */ +static VtsID vts_tab_freelist = VtsID_INVALID; + +/* Do a GC of vts_tab when the freelist becomes empty AND the size of + vts_tab equals or exceeds this size. After GC, the value here is + set appropriately so as to check for the next GC point. */ +static Word vts_next_GC_at = 1000; + +static void vts_tab_init ( void ) +{ + vts_tab + = VG_(newXA)( HG_(zalloc), "libhb.vts_tab_init.1", + HG_(free), sizeof(VtsTE) ); + vts_tab_freelist + = VtsID_INVALID; + tl_assert(vts_tab); +} + +/* Add ii to the free list, checking that it looks out-of-use. */ +static void add_to_free_list ( VtsID ii ) +{ + VtsTE* ie = VG_(indexXA)( vts_tab, ii ); + tl_assert(ie->vts == NULL); + tl_assert(ie->rc == 0); + tl_assert(ie->freelink == VtsID_INVALID); + ie->freelink = vts_tab_freelist; + vts_tab_freelist = ii; +} + +/* Get an entry from the free list. This will return VtsID_INVALID if + the free list is empty. */ +static VtsID get_from_free_list ( void ) +{ + VtsID ii; + VtsTE* ie; + if (vts_tab_freelist == VtsID_INVALID) + return VtsID_INVALID; + ii = vts_tab_freelist; + ie = VG_(indexXA)( vts_tab, ii ); + tl_assert(ie->vts == NULL); + tl_assert(ie->rc == 0); + vts_tab_freelist = ie->freelink; + return ii; +} + +/* Produce a new VtsID that can be used, either by getting it from + the freelist, or, if that is empty, by expanding vts_tab. */ +static VtsID get_new_VtsID ( void ) +{ + VtsID ii; + VtsTE te; + ii = get_from_free_list(); + if (ii != VtsID_INVALID) + return ii; + te.vts = NULL; + te.rc = 0; + te.freelink = VtsID_INVALID; + ii = (VtsID)VG_(addToXA)( vts_tab, &te ); + return ii; +} + + +/* Indirect callback from lib_zsm. */ +static void VtsID__rcinc ( VtsID ii ) +{ + VtsTE* ie; + /* VG_(indexXA) does a range check for us */ + ie = VG_(indexXA)( vts_tab, ii ); + tl_assert(ie->vts); /* else it's not in use */ + tl_assert(ie->rc < ~0UL); /* else we can't continue */ + tl_assert(ie->vts->id == ii); + ie->rc++; +} + +/* Indirect callback from lib_zsm. */ +static void VtsID__rcdec ( VtsID ii ) +{ + VtsTE* ie; + /* VG_(indexXA) does a range check for us */ + ie = VG_(indexXA)( vts_tab, ii ); + tl_assert(ie->vts); /* else it's not in use */ + tl_assert(ie->rc > 0); /* else RC snafu */ + tl_assert(ie->vts->id == ii); + ie->rc--; +} + + +/* Look up 'cand' in our collection of VTSs. If present, deallocate + it and return the VtsID for the pre-existing version. If not + present, add it to both vts_tab and vts_set, allocate a fresh VtsID + for it, and return that. */ +static VtsID vts_tab__find_and_dealloc__or_add ( VTS* cand ) +{ + VTS* auld; + tl_assert(cand->id == VtsID_INVALID); + auld = vts_set__find_and_dealloc__or_add(cand); + if (auld != cand) { + /* We already have an Aulde one. Use that. */ + VtsTE* ie; + tl_assert(auld->id != VtsID_INVALID); + ie = VG_(indexXA)( vts_tab, auld->id ); + tl_assert(ie->vts == auld); + return auld->id; + } else { + VtsID ii = get_new_VtsID(); + VtsTE* ie = VG_(indexXA)( vts_tab, ii ); + ie->vts = cand; + ie->rc = 0; + ie->freelink = VtsID_INVALID; + cand->id = ii; + return ii; + } +} + + +static void show_vts_stats ( HChar* caller ) +{ + UWord nSet, nTab, nLive; + ULong totrc; + UWord n, i; + nSet = VG_(sizeFM)( vts_set ); + nTab = VG_(sizeXA)( vts_tab ); + totrc = 0; + nLive = 0; + n = VG_(sizeXA)( vts_tab ); + for (i = 0; i < n; i++) { + VtsTE* ie = VG_(indexXA)( vts_tab, i ); + if (ie->vts) { + nLive++; + totrc += (ULong)ie->rc; + } else { + tl_assert(ie->rc == 0); + } + } + VG_(printf)(" show_vts_stats %s\n", caller); + VG_(printf)(" vts_tab size %4lu\n", nTab); + VG_(printf)(" vts_tab live %4lu\n", nLive); + VG_(printf)(" vts_set size %4lu\n", nSet); + VG_(printf)(" total rc %4llu\n", totrc); +} + +/* NOT TO BE CALLED FROM WITHIN libzsm. */ +__attribute__((noinline)) +static void vts_tab__do_GC ( Bool show_stats ) +{ + UWord i, nTab, nLive, nFreed; + + /* check this is actually necessary. */ + tl_assert(vts_tab_freelist == VtsID_INVALID); + + /* empty the caches for partial order checks and binary joins. We + could do better and prune out the entries to be deleted, but it + ain't worth the hassle. */ + VtsID__invalidate_caches(); + + /* First, make the reference counts up to date. */ + zsm_flush_cache(); + + nTab = VG_(sizeXA)( vts_tab ); + + if (show_stats) { + VG_(printf)("<<GC begins at vts_tab size %lu>>\n", nTab); + show_vts_stats("before GC"); + } + + /* Now we can inspect the entire vts_tab. Any entries + with zero .rc fields are now no longer in use and can be + free list, removed from vts_set, and deleted. */ + nFreed = 0; + for (i = 0; i < nTab; i++) { + Bool present; + UWord oldK = 0, oldV = 0; + VtsTE* te = VG_(indexXA)( vts_tab, i ); + if (te->vts == NULL) { + tl_assert(te->rc == 0); + continue; /* already on the free list (presumably) */ + } + if (te->rc > 0) + continue; /* in use */ + /* Ok, we got one we can free. */ + tl_assert(te->vts->id == i); + /* first, remove it from vts_set. */ + present = VG_(delFromFM)( vts_set, + &oldK, &oldV, (UWord)te->vts ); + tl_assert(present); /* else it isn't in vts_set ?! */ + tl_assert(oldV == 0); /* no info stored in vts_set val fields */ + tl_assert(oldK == (UWord)te->vts); /* else what did delFromFM find?! */ + /* now free the VTS itself */ + VTS__delete(te->vts); + te->vts = NULL; + /* and finally put this entry on the free list */ + tl_assert(te->freelink == VtsID_INVALID); /* can't already be on it */ + add_to_free_list( i ); + nFreed++; + } + + /* Now figure out when the next GC should be. We'll allow the + number of VTSs to double before GCing again. Except of course + that since we can't (or, at least, don't) shrink vts_tab, we + can't set the threshhold value smaller than it. */ + tl_assert(nFreed <= nTab); + nLive = nTab - nFreed; + tl_assert(nLive >= 0 && nLive <= nTab); + vts_next_GC_at = 2 * nLive; + if (vts_next_GC_at < nTab) + vts_next_GC_at = nTab; + + if (show_stats) { + show_vts_stats("after GC"); + VG_(printf)("<<GC ends, next gc at %ld>>\n", vts_next_GC_at); + } + + if (VG_(clo_verbosity) > 1) { + static UInt ctr = 0; + tl_assert(nTab > 0); + VG_(message)(Vg_DebugMsg, + "libhb: VTS GC: #%u old size %lu live %lu (%2llu%%)", + ctr++, nTab, nLive, (100ULL * (ULong)nLive) / (ULong)nTab); + } +} + + +///////////////////////////////////////////////////////// +// // +// Vts IDs // +// // +///////////////////////////////////////////////////////// + +////////////////////////// +static ULong stats__getOrdering_queries = 0; +static ULong stats__getOrdering_misses = 0; +static ULong stats__join2_queries = 0; +static ULong stats__join2_misses = 0; + +static inline UInt ROL32 ( UInt w, Int n ) { + w = (w << n) | (w >> (32-n)); + return w; +} +static inline UInt hash_VtsIDs ( VtsID vi1, VtsID vi2, UInt nTab ) { + UInt hash = ROL32(vi1,19) ^ ROL32(vi2,13); + return hash % nTab; +} + +#define N_GETORDERING_CACHE 1023 +static + struct { VtsID vi1; VtsID vi2; POrd ord; } + getOrdering_cache[N_GETORDERING_CACHE]; + +#define N_JOIN2_CACHE 1023 +static + struct { VtsID vi1; VtsID vi2; VtsID res; } + join2_cache[N_JOIN2_CACHE]; + +static void VtsID__invalidate_caches ( void ) { + Int i; + for (i = 0; i < N_GETORDERING_CACHE; i++) { + getOrdering_cache[i].vi1 = VtsID_INVALID; + getOrdering_cache[i].vi2 = VtsID_INVALID; + getOrdering_cache[i].ord = 0; /* an invalid POrd value */ + } + for (i = 0; i < N_JOIN2_CACHE; i++) { + join2_cache[i].vi1 = VtsID_INVALID; + join2_cache[i].vi2 = VtsID_INVALID; + join2_cache[i].res = VtsID_INVALID; + } +} +////////////////////////// + +//static Bool VtsID__is_valid ( VtsID vi ) { +// VtsTE* ve; +// if (vi >= (VtsID)VG_(sizeXA)( vts_tab )) +// return False; +// ve = VG_(indexXA)( vts_tab, vi ); +// if (!ve->vts) +// return False; +// tl_assert(ve->vts->id == vi); +// return True; +//} + +static VTS* VtsID__to_VTS ( VtsID vi ) { + VtsTE* te = VG_(indexXA)( vts_tab, vi ); + tl_assert(te->vts); + return te->vts; +} + +static void VtsID__pp ( VtsID vi ) { + HChar buf[100]; + VTS* vts = VtsID__to_VTS(vi); + VTS__show( buf, sizeof(buf)-1, vts ); + buf[sizeof(buf)-1] = 0; + VG_(printf)("%s", buf); +} + +/* compute partial ordering relation of vi1 and vi2. */ +__attribute__((noinline)) +static POrd VtsID__getOrdering_WRK ( VtsID vi1, VtsID vi2 ) { + UInt hash; + POrd ord; + VTS *v1, *v2; + //if (vi1 == vi2) return POrd_EQ; + tl_assert(vi1 != vi2); + ////++ + stats__getOrdering_queries++; + hash = hash_VtsIDs(vi1, vi2, N_GETORDERING_CACHE); + if (getOrdering_cache[hash].vi1 == vi1 + && getOrdering_cache[hash].vi2 == vi2) + return getOrdering_cache[hash].ord; + stats__getOrdering_misses++; + ////-- + v1 = VtsID__to_VTS(vi1); + v2 = VtsID__to_VTS(vi2); + ord = VTS__cmp( v1, v2 ); + ////++ + getOrdering_cache[hash].vi1 = vi1; + getOrdering_cache[hash].vi2 = vi2; + getOrdering_cache[hash].ord = ord; + ////-- + return ord; +} +static inline POrd VtsID__getOrdering ( VtsID vi1, VtsID vi2 ) { + return vi1 == vi2 ? POrd_EQ : VtsID__getOrdering_WRK(vi1, vi2); +} + +/* compute binary join */ +__attribute__((noinline)) +static VtsID VtsID__join2_WRK ( VtsID vi1, VtsID vi2 ) { + UInt hash; + VtsID res; + VTS *vts1, *vts2, *nyu; + //if (vi1 == vi2) return vi1; + tl_assert(vi1 != vi2); + ////++ + stats__join2_queries++; + hash = hash_VtsIDs(vi1, vi2, N_JOIN2_CACHE); + if (join2_cache[hash].vi1 == vi1 + && join2_cache[hash].vi2 == vi2) + return join2_cache[hash].res; + stats__join2_misses++; + ////-- + vts1 = VtsID__to_VTS(vi1); + vts2 = VtsID__to_VTS(vi2); + nyu = VTS__join(vts1,vts2); + res = vts_tab__find_and_dealloc__or_add(nyu); + ////++ + join2_cache[hash].vi1 = vi1; + join2_cache[hash].vi2 = vi2; + join2_cache[hash].res = res; + ////-- + return res; +} +static inline VtsID VtsID__join2 ( VtsID vi1, VtsID vi2 ) { + return vi1 == vi2 ? vi1 : VtsID__join2_WRK(vi1, vi2); +} + +/* create a singleton VTS, namely [thr:1] */ +static VtsID VtsID__mk_Singleton ( Thr* thr, ULong tym ) { + VTS* nyu = VTS__singleton(thr,tym); + return vts_tab__find_and_dealloc__or_add(nyu); +} + +/* tick operation, creates value 1 if specified index is absent */ +static VtsID VtsID__tick ( VtsID vi, Thr* idx ) { + VTS* vts = VtsID__to_VTS(vi); + VTS* nyu = VTS__tick(idx,vts); + return vts_tab__find_and_dealloc__or_add(nyu); +} + +/* index into a VTS (only for assertions) */ +static ULong VtsID__indexAt ( VtsID vi, Thr* idx ) { + VTS* vts = VtsID__to_VTS(vi); + return VTS__indexAt_SLOW( vts, idx ); +} + + +///////////////////////////////////////////////////////// +// // +// Threads // +// // +///////////////////////////////////////////////////////// + +struct _Thr { + /* Current VTSs for this thread. They change as we go along. viR + is the VTS to be used for reads, viW for writes. Usually they + are the same, but can differ when we deal with reader-writer + locks. It is always the case that VtsID__getOrdering(viW,viR) + == POrd_LT or POrdEQ -- that is, viW must be the same, or + lagging behind, viR. */ + VtsID viR; + VtsID viW; + /* opaque (to us) data we hold on behalf of the library's user. */ + void* opaque; +}; + +static Thr* Thr__new ( void ) { + Thr* thr = HG_(zalloc)( "libhb.Thr__new.1", sizeof(Thr) ); + thr->viR = VtsID_INVALID; + thr->viW = VtsID_INVALID; + return thr; +} + + +///////////////////////////////////////////////////////// +// // +// Shadow Values // +// // +///////////////////////////////////////////////////////// + +// type SVal, SVal_INVALID and SVal_NOACCESS are defined by +// hb_zsm.h. We have to do everything else here. + +/* SVal is 64 bit unsigned int. + + <---------30---------> <---------30---------> + 00 X-----Rmin-VtsID-----X 00 X-----Wmin-VtsID-----X C(Rmin,Wmin) + 01 X--------------------X XX X--------------------X E(rror) + 10 X--------------------X XX X--------------------X A: SVal_NOACCESS + 11 X--------------------X XX X--------------------X I: SVal_INVALID +*/ +#define SVAL_TAGMASK (3ULL << 62) + +static inline Bool SVal__isC ( SVal s ) { + return (0ULL << 62) == (s & SVAL_TAGMASK); +} +static inline SVal SVal__mkC ( VtsID rmini, VtsID wmini ) { + //tl_assert(VtsID__is_valid(rmini)); + //tl_assert(VtsID__is_valid(wmini)); + return (((ULong)rmini) << 32) | ((ULong)wmini); +} +static inline VtsID SVal__unC_Rmin ( SVal s ) { + tl_assert(SVal__isC(s)); + return (VtsID)(s >> 32); +} +static inline VtsID SVal__unC_Wmin ( SVal s ) { + tl_assert(SVal__isC(s)); + return (VtsID)(s & 0xFFFFFFFFULL); +} + +static Bool SVal__isE ( SVal s ) { + return (1ULL << 62) == (s & SVAL_TAGMASK); +} +static SVal SVal__mkE ( void ) { + return 1ULL << 62; +} + +static Bool SVal__isA ( SVal s ) { + return (2ULL << 62) == (s & SVAL_TAGMASK); +} +static SVal SVal__mkA ( void ) { + return 2ULL << 62; +} + +/* Direct callback from lib_zsm. */ +static void SVal__rcinc ( SVal s ) { + if (SVal__isC(s)) { + VtsID__rcinc( SVal__unC_Rmin(s) ); + VtsID__rcinc( SVal__unC_Wmin(s) ); + } +} + +/* Direct callback from lib_zsm. */ +static void SVal__rcdec ( SVal s ) { + if (SVal__isC(s)) { + VtsID__rcdec( SVal__unC_Rmin(s) ); + VtsID__rcdec( SVal__unC_Wmin(s) ); + } +} + + +///////////////////////////////////////////////////////// +// // +// A simple group (memory) allocator // +// // +///////////////////////////////////////////////////////// + +//////////////// BEGIN general group allocator +typedef + struct { + UWord elemSzB; /* element size */ + UWord nPerGroup; /* # elems per group */ + void* (*alloc)(HChar*, SizeT); /* group allocator */ + HChar* cc; /* group allocator's cc */ + void (*free)(void*); /* group allocator's free-er (unused) */ + /* XArray of void* (pointers to groups). The groups themselves. + Each element is a pointer to a block of size (elemSzB * + nPerGroup) bytes. */ + XArray* groups; + /* next free element. Is a pointer to an element in one of the + groups pointed to by .groups. */ + void* nextFree; + } + GroupAlloc; + +static void init_GroupAlloc ( /*MOD*/GroupAlloc* ga, + UWord elemSzB, + UWord nPerGroup, + void* (*alloc)(HChar*, SizeT), + HChar* cc, + void (*free)(void*) ) +{ + tl_assert(0 == (elemSzB % sizeof(UWord))); + tl_assert(elemSzB >= sizeof(UWord)); + tl_assert(nPerGroup >= 100); /* let's say */ + tl_assert(alloc); + tl_assert(cc); + tl_assert(free); + tl_assert(ga); + VG_(memset)(ga, 0, sizeof(*ga)); + ga->elemSzB = elemSzB; + ga->nPerGroup = nPerGroup; + ga->groups = NULL; + ga->alloc = alloc; + ga->cc = cc; + ga->free = free; + ga->groups = VG_(newXA)( alloc, cc, free, sizeof(void*) ); + ga->nextFree = NULL; + tl_assert(ga->groups); +} + +/* The freelist is empty. Allocate a new group and put all the new + elements in it onto the freelist. */ +__attribute__((noinline)) +static void gal_add_new_group ( GroupAlloc* ga ) +{ + Word i; + UWord* group; + tl_assert(ga); + tl_assert(ga->nextFree == NULL); + group = ga->alloc( ga->cc, ga->elemSzB * ga->nPerGroup ); + tl_assert(group); + /* extend the freelist through the new group. Place the freelist + pointer in the first word of each element. That's why the + element size must be at least one word. */ + for (i = ga->nPerGroup-1; i >= 0; i--) { + UChar* elemC = ((UChar*)group) + i * ga->elemSzB; + UWord* elem = (UWord*)elemC; + tl_assert(0 == (((UWord)elem) % sizeof(UWord))); + *elem = (UWord)ga->nextFree; + ga->nextFree = elem; + } + /* and add to our collection of groups */ + VG_(addToXA)( ga->groups, &group ); +} + +inline static void* gal_Alloc ( GroupAlloc* ga ) +{ + UWord* elem; + if (UNLIKELY(ga->nextFree == NULL)) { + gal_add_new_group(ga); + } + elem = ga->nextFree; + ga->nextFree = (void*)*elem; + *elem = 0; /* unnecessary, but just to be on the safe side */ + return elem; +} + +inline static void* gal_Alloc_w_size_check ( GroupAlloc* ga, SizeT n ) +{ + tl_assert(n == ga->elemSzB); + return gal_Alloc( ga ); +} + +inline static void gal_Free ( GroupAlloc* ga, void* p ) +{ + UWord* elem = (UWord*)p; + *elem = (UWord)ga->nextFree; + ga->nextFree = elem; +} +//////////////// END general group allocator + + +///////////////////////////////////////////////////////// +// // +// Change-event map2 // +// // +///////////////////////////////////////////////////////// + +#define EVENT_MAP_GC_DISCARD_FRACTION 0.5 + +/* This is in two parts: + + 1. An OSet of RCECs. This is a set of reference-counted stack + traces. When the reference count of a stack trace becomes zero, + it is removed from the set and freed up. The intent is to have + a set of stack traces which can be referred to from (2), but to + only represent each one once. The set is indexed/searched by + ordering on the stack trace vectors. + + 2. A SparseWA of OldRefs. These store information about each old + ref that we need to record. It is indexed by address of the + location for which the information is recorded. For LRU + purposes, each OldRef also contains a generation number, + indicating when it was most recently accessed. + + The important part of an OldRef is, however, its accs[] array. + This is an array of N_OLDREF_ACCS which binds (thread, R/W, + size) triples to RCECs. This allows us to collect the last + access-traceback by up to N_OLDREF_ACCS different triples for + this location. The accs[] array is a MTF-array. If a binding + falls off the end, that's too bad -- we will lose info about + that triple's access to this location. + + When the SparseWA becomes too big, we can throw away the OldRefs + whose generation numbers are below some threshold; hence doing + approximate LRU discarding. For each discarded OldRef we must + of course decrement the reference count on the all RCECs it + refers to, in order that entries from (1) eventually get + discarded too. + + A major improvement in reliability of this mechanism would be to + have a dynamically sized OldRef.accs[] array, so no entries ever + fall off the end. In investigations (Dec 08) it appears that a + major cause for the non-availability of conflicting-access traces + in race reports is caused by the fixed size of this array. I + suspect for most OldRefs, only a few entries are used, but for a + minority of cases there is an overflow, leading to info lossage. + Investigations also suggest this is very workload and scheduling + sensitive. Therefore a dynamic sizing would be better. + + However, dynamic sizing would defeat the use of a GroupAllocator + for OldRef structures. And that's important for performance. So + it's not straightforward to do. +*/ + + +static UWord stats__ctxt_rcdec1 = 0; +static UWord stats__ctxt_rcdec2 = 0; +static UWord stats__ctxt_rcdec3 = 0; +static UWord stats__ctxt_rcdec_calls = 0; +static UWord stats__ctxt_rcdec_discards = 0; +static UWord stats__ctxt_rcdec1_eq = 0; + +static UWord stats__ctxt_tab_curr = 0; +static UWord stats__ctxt_tab_max = 0; + +static UWord stats__ctxt_tab_qs = 0; +static UWord stats__ctxt_tab_cmps = 0; + + +/////////////////////////////////////////////////////// +//// Part (1): An OSet of RCECs +/// + +#define N_FRAMES 8 + +// (UInt) `echo "Reference Counted Execution Context" | md5sum` +#define RCEC_MAGIC 0xab88abb2UL + +//#define N_RCEC_TAB 98317 /* prime */ +#define N_RCEC_TAB 196613 /* prime */ + +typedef + struct _RCEC { + UWord magic; /* sanity check only */ + struct _RCEC* next; + UWord rc; + UWord rcX; /* used for crosschecking */ + UWord frames[1 + N_FRAMES]; /* first word is hash of all the rest */ + } + RCEC; + +static RCEC** contextTab = NULL; /* hash table of RCEC*s */ + + +/* Gives an arbitrary total order on RCEC .frames fields */ +static Word RCEC__cmp_by_frames ( RCEC* ec1, RCEC* ec2 ) { + Word i; + tl_assert(ec1 && ec1->magic == RCEC_MAGIC); + tl_assert(ec2 && ec2->magic == RCEC_MAGIC); + if (ec1->frames[0] < ec2->frames[0]) return -1; + if (ec1->frames[0] > ec2->frames[0]) return 1; + for (i = 1; i < 1 + N_FRAMES; i++) { + if (ec1->frames[i] < ec2->frames[i]) return -1; + if (ec1->frames[i] > ec2->frames[i]) return 1; + } + return 0; +} + + +/* Dec the ref of this RCEC. */ +static void ctxt__rcdec ( RCEC* ec ) +{ + stats__ctxt_rcdec_calls++; + tl_assert(ec && ec->magic == RCEC_MAGIC); + tl_assert(ec->rc > 0); + ec->rc--; +} + +static void ctxt__rcinc ( RCEC* ec ) +{ + tl_assert(ec && ec->magic == RCEC_MAGIC); + ec->rc++; +} + + +//////////// BEGIN RCEC group allocator +static GroupAlloc rcec_group_allocator; + +static RCEC* alloc_RCEC ( void ) { + return gal_Alloc ( &rcec_group_allocator ); +} + +static void free_RCEC ( RCEC* rcec ) { + tl_assert(rcec->magic == RCEC_MAGIC); + gal_Free( &rcec_group_allocator, rcec ); +} +//////////// END OldRef group allocator + + +/* Find 'ec' in the RCEC list whose head pointer lives at 'headp' and + move it one step closer the the front of the list, so as to make + subsequent searches for it cheaper. */ +static void move_RCEC_one_step_forward ( RCEC** headp, RCEC* ec ) +{ + RCEC *ec0, *ec1, *ec2; + if (ec == *headp) + tl_assert(0); /* already at head of list */ + tl_assert(ec != NULL); + ec0 = *headp; + ec1 = NULL; + ec2 = NULL; + while (True) { + if (ec0 == NULL || ec0 == ec) break; + ec2 = ec1; + ec1 = ec0; + ec0 = ec0->next; + } + tl_assert(ec0 == ec); + if (ec0 != NULL && ec1 != NULL && ec2 != NULL) { + RCEC* tmp; + /* ec0 points to ec, ec1 to its predecessor, and ec2 to ec1's + predecessor. Swap ec0 and ec1, that is, move ec0 one step + closer to the start of the list. */ + tl_assert(ec2->next == ec1); + tl_assert(ec1->next == ec0); + tmp = ec0->next; + ec2->next = ec0; + ec0->next = ec1; + ec1->next = tmp; + } + else + if (ec0 != NULL && ec1 != NULL && ec2 == NULL) { + /* it's second in the list. */ + tl_assert(*headp == ec1); + tl_assert(ec1->next == ec0); + ec1->next = ec0->next; + ec0->next = ec1; + *headp = ec0; + } +} + + +/* Find the given RCEC in the tree, and return a pointer to it. Or, + if not present, add the given one to the tree (by making a copy of + it, so the caller can immediately deallocate the original) and + return a pointer to the copy. The caller can safely have 'example' + on its stack, since we will always return a pointer to a copy of + it, not to the original. Note that the inserted node will have .rc + of zero and so the caller must immediatly increment it. */ +__attribute__((noinline)) +static RCEC* ctxt__find_or_add ( RCEC* example ) +{ + UWord hent; + RCEC* copy; + tl_assert(example && example->magic == RCEC_MAGIC); + tl_assert(example->rc == 0); + + /* Search the hash table to see if we already have it. */ + stats__ctxt_tab_qs++; + hent = example->frames[0] % N_RCEC_TAB; + copy = contextTab[hent]; + while (1) { + if (!copy) break; + tl_assert(copy->magic == RCEC_MAGIC); + stats__ctxt_tab_cmps++; + if (0 == RCEC__cmp_by_frames(copy, example)) break; + copy = copy->next; + } + + if (copy) { + tl_assert(copy != example); + /* optimisation: if it's not at the head of its list, move 1 + step fwds, to make future searches cheaper */ + if (copy != contextTab[hent]) { + move_RCEC_one_step_forward( &contextTab[hent], copy ); + } + } else { + copy = alloc_RCEC(); + tl_assert(copy != example); + *copy = *example; + copy->next = contextTab[hent]; + contextTab[hent] = copy; + stats__ctxt_tab_curr++; + if (stats__ctxt_tab_curr > stats__ctxt_tab_max) + stats__ctxt_tab_max = stats__ctxt_tab_curr; + } + return copy; +} + +static inline UWord ROLW ( UWord w, Int n ) +{ + Int bpw = 8 * sizeof(UWord); + w = (w << n) | (w >> (bpw-n)); + return w; +} + +__attribute__((noinline)) +static RCEC* get_RCEC ( Thr* thr ) +{ + UWord hash, i; + RCEC example; + example.magic = RCEC_MAGIC; + example.rc = 0; + example.rcX = 0; + main_get_stacktrace( thr, &example.frames[1], N_FRAMES ); + hash = 0; + for (i = 1; i < 1 + N_FRAMES; i++) { + hash ^= example.frames[i]; + hash = ROLW(hash, 19); + } + example.frames[0] = hash; + return ctxt__find_or_add( &example ); +} + +/////////////////////////////////////////////////////// +//// Part (2): +/// A SparseWA guest-addr -> OldRef, that refers to (1) +/// + +// (UInt) `echo "Old Reference Information" | md5sum` +#define OldRef_MAGIC 0x30b1f075UL + +/* Records an access: a thread and a context. The size + (1,2,4,8) and read-or-writeness are also encoded as + follows: bottom bit of .thr is 1 if write, 0 if read + bottom 2 bits of .rcec are encode size: + 00 = 1, 01 = 2, 10 = 4, 11 = 8 +*/ +typedef struct { Thr* thr; RCEC* rcec; } Thr_n_RCEC; + +#define N_OLDREF_ACCS 5 + +typedef + struct { + UWord magic; /* sanity check only */ + UWord gen; /* when most recently accessed */ + /* or free list when not in use */ + /* unused slots in this array have .thr == NULL */ + Thr_n_RCEC accs[N_OLDREF_ACCS]; + } + OldRef; + + +//////////// BEGIN OldRef group allocator +static GroupAlloc oldref_group_allocator; + +static OldRef* alloc_OldRef ( void ) { + return gal_Alloc ( &oldref_group_allocator ); +} + +static void free_OldRef ( OldRef* r ) { + tl_assert(r->magic == OldRef_MAGIC); + gal_Free( &oldref_group_allocator, r ); +} +//////////// END OldRef group allocator + + +static SparseWA* oldrefTree = NULL; /* SparseWA* OldRef* */ +static UWord oldrefGen = 0; /* current LRU generation # */ +static UWord oldrefTreeN = 0; /* # elems in oldrefTree */ +static UWord oldrefGenIncAt = 0; /* inc gen # when size hits this */ + +inline static void* ptr_or_UWord ( void* p, UWord w ) { + return (void*)( ((UWord)p) | ((UWord)w) ); +} +inline static void* ptr_and_UWord ( void* p, UWord w ) { + return (void*)( ((UWord)p) & ((UWord)w) ); +} + +inline static UInt min_UInt ( UInt a, UInt b ) { + return a < b ? a : b; +} + +/* Compare the intervals [a1,a1+n1) and [a2,a2+n2). Return -1 if the + first interval is lower, 1 if the first interval is higher, and 0 + if there is any overlap. Redundant paranoia with casting is there + following what looked distinctly like a bug in gcc-4.1.2, in which + some of the comparisons were done signedly instead of + unsignedly. */ +/* Copied from exp-ptrcheck/sg_main.c */ +static Word cmp_nonempty_intervals ( Addr a1, SizeT n1, + Addr a2, SizeT n2 ) { + UWord a1w = (UWord)a1; + UWord n1w = (UWord)n1; + UWord a2w = (UWord)a2; + UWord n2w = (UWord)n2; + tl_assert(n1w > 0 && n2w > 0); + if (a1w + n1w <= a2w) return -1L; + if (a2w + n2w <= a1w) return 1L; + return 0; +} + +static void event_map_bind ( Addr a, SizeT szB, Bool isW, Thr* thr ) +{ + OldRef* ref; + RCEC* rcec; + Word i, j; + UWord keyW, valW; + Bool b; + + rcec = get_RCEC( thr ); + ctxt__rcinc(rcec); + + /* encode the size and writeness of the transaction in the bottom + two bits of thr and rcec. */ + thr = ptr_or_UWord(thr, isW ? 1 : 0); + switch (szB) { + /* This doesn't look particularly branch-predictor friendly. */ + case 1: rcec = ptr_or_UWord(rcec, 0); break; + case 2: rcec = ptr_or_UWord(rcec, 1); break; + case 4: rcec = ptr_or_UWord(rcec, 2); break; + case 8: rcec = ptr_or_UWord(rcec, 3); break; + default: tl_assert(0); + } + + /* Look in the map to see if we already have this. */ + b = VG_(lookupSWA)( oldrefTree, &keyW, &valW, a ); + + if (b) { + + /* We already have a record for this address. We now need to + see if we have a stack trace pertaining to this (thread, R/W, + size) triple. */ + tl_assert(keyW == a); + ref = (OldRef*)valW; + tl_assert(ref->magic == OldRef_MAGIC); + + tl_assert(thr); + for (i = 0; i < N_OLDREF_ACCS; i++) { + if (ref->accs[i].thr != thr) + continue; + /* since .thr encodes both the accessing thread and the + read/writeness, we know now that at least those features + of the access match this entry. So we just need to check + the size indication. Do this by inspecting the lowest 2 bits of + .rcec, which contain the encoded size info. */ + if (ptr_and_UWord(ref->accs[i].rcec,3) != ptr_and_UWord(rcec,3)) + continue; + /* else we have a match, so stop looking. */ + break; + } + + if (i < N_OLDREF_ACCS) { + /* thread 'thr' has an entry at index 'i'. Update it. */ + if (i > 0) { + Thr_n_RCEC tmp = ref->accs[i-1]; + ref->accs[i-1] = ref->accs[i]; + ref->accs[i] = tmp; + i--; + } + if (rcec == ref->accs[i].rcec) stats__ctxt_rcdec1_eq++; + stats__ctxt_rcdec1++; + ctxt__rcdec( ptr_and_UWord(ref->accs[i].rcec, ~3) ); + ref->accs[i].rcec = rcec; + tl_assert(ref->accs[i].thr == thr); + } else { + /* No entry for this (thread, R/W, size) triple. Shuffle all + of them down one slot, and put the new entry at the start + of the array. */ + if (ref->accs[N_OLDREF_ACCS-1].thr) { + /* the last slot is in use. We must dec the rc on the + associated rcec. */ + tl_assert(ref->accs[N_OLDREF_ACCS-1].rcec); + stats__ctxt_rcdec2++; + if (0 && 0 == (stats__ctxt_rcdec2 & 0xFFF)) + VG_(printf)("QQQQ %lu overflows\n",stats__ctxt_rcdec2); + ctxt__rcdec( ptr_and_UWord(ref->accs[N_OLDREF_ACCS-1].rcec, ~3) ); + } else { + tl_assert(!ref->accs[N_OLDREF_ACCS-1].rcec); + } + for (j = N_OLDREF_ACCS-1; j >= 1; j--) + ref->accs[j] = ref->accs[j-1]; + ref->accs[0].thr = thr; + ref->accs[0].rcec = rcec; + /* thr==NULL is used to signify an empty slot, so we can't + add a NULL thr. */ + tl_assert(ptr_and_UWord(thr, ~3) != 0); + } + + ref->gen = oldrefGen; + + } else { + + /* We don't have a record for this address. Create a new one. */ + if (oldrefTreeN >= oldrefGenIncAt) { + oldrefGen++; + oldrefGenIncAt = oldrefTreeN + 50000; + if (0) VG_(printf)("oldrefTree: new gen %lu at size %lu\n", + oldrefGen, oldrefTreeN ); + } + + ref = alloc_OldRef(); + ref->magic = OldRef_MAGIC; + ref->gen = oldrefGen; + ref->accs[0].rcec = rcec; + ref->accs[0].thr = thr; + /* thr==NULL is used to signify an empty slot, so we can't add a + NULL thr. */ + tl_assert(ptr_and_UWord(thr, ~3) != 0); + for (j = 1; j < N_OLDREF_ACCS; j++) { + ref->accs[j].thr = NULL; + ref->accs[j].rcec = NULL; + } + VG_(addToSWA)( oldrefTree, a, (UWord)ref ); + oldrefTreeN++; + + } +} + + +Bool libhb_event_map_lookup ( /*OUT*/ExeContext** resEC, + /*OUT*/Thr** resThr, + /*OUT*/SizeT* resSzB, + /*OUT*/Bool* resIsW, + Thr* thr, Addr a, SizeT szB, Bool isW ) +{ + Word i, j; + OldRef* ref; + UWord keyW, valW; + Bool b; + + Thr* cand_thr; + RCEC* cand_rcec; + Bool cand_isW; + SizeT cand_szB; + Addr cand_a; + + Addr toCheck[15]; + Int nToCheck = 0; + + tl_assert(thr); + tl_assert(szB == 8 || szB == 4 || szB == 2 || szB == 1); + + toCheck[nToCheck++] = a; + for (i = -7; i < (Word)szB; i++) { + if (i != 0) + toCheck[nToCheck++] = a + i; + } + tl_assert(nToCheck <= 15); + + /* Now see if we can find a suitable matching event for + any of the addresses in toCheck[0 .. nToCheck-1]. */ + for (j = 0; j < nToCheck; j++) { + + cand_a = toCheck[j]; + // VG_(printf)("test %ld %p\n", j, cand_a); + + b = VG_(lookupSWA)( oldrefTree, &keyW, &valW, cand_a ); + if (!b) + continue; + + ref = (OldRef*)valW; + tl_assert(keyW == cand_a); + tl_assert(ref->magic == OldRef_MAGIC); + tl_assert(ref->accs[0].thr); /* first slot must always be used */ + + cand_thr = NULL; + cand_rcec = NULL; + cand_isW = False; + cand_szB = 0; + + for (i = 0; i < N_OLDREF_ACCS; i++) { + Thr_n_RCEC* cand = &ref->accs[i]; + cand_thr = ptr_and_UWord(cand->thr, ~3); + cand_rcec = ptr_and_UWord(cand->rcec, ~3); + /* Decode the writeness from the bottom bit of .thr. */ + cand_isW = 1 == (UWord)ptr_and_UWord(cand->thr, 1); + /* Decode the size from the bottom two bits of .rcec. */ + switch ((UWord)ptr_and_UWord(cand->rcec, 3)) { + case 0: cand_szB = 1; break; + case 1: cand_szB = 2; break; + case 2: cand_szB = 4; break; + case 3: cand_szB = 8; break; + default: tl_assert(0); + } + + if (cand_thr == NULL) + /* This slot isn't in use. Ignore it. */ + continue; + + if (cand_thr == thr) + /* This is an access by the same thread, but we're only + interested in accesses from other threads. Ignore. */ + continue; + + if ((!cand_isW) && (!isW)) + /* We don't want to report a read racing against another + read; that's stupid. So in this case move on. */ + continue; + + if (cmp_nonempty_intervals(a, szB, cand_a, cand_szB) != 0) + /* No overlap with the access we're asking about. Ignore. */ + continue; + + /* We have a match. Stop searching. */ + break; + } + + tl_assert(i >= 0 && i <= N_OLDREF_ACCS); + + if (i < N_OLDREF_ACCS) { + /* return with success */ + tl_assert(cand_thr); + tl_assert(cand_rcec); + tl_assert(cand_rcec->magic == RCEC_MAGIC); + tl_assert(cand_szB >= 1); + *resEC = VG_(make_ExeContext_from_StackTrace)( + &cand_rcec->frames[1], + min_UInt(N_FRAMES, VG_(clo_backtrace_size)) + ); + *resThr = cand_thr; + *resSzB = cand_szB; + *resIsW = cand_isW; + return True; + } + + /* consider next address in toCheck[] */ + } /* for (j = 0; j < nToCheck; j++) */ + + /* really didn't find anything. */ + return False; +} + +static void event_map_init ( void ) +{ + Word i; + + /* Context (RCEC) group allocator */ + init_GroupAlloc ( &rcec_group_allocator, + sizeof(RCEC), + 1000 /* RCECs per group */, + HG_(zalloc), + "libhb.event_map_init.1 (RCEC groups)", + HG_(free) ); + + /* Context table */ + tl_assert(!contextTab); + contextTab = HG_(zalloc)( "libhb.event_map_init.2 (context table)", + N_RCEC_TAB * sizeof(RCEC*) ); + tl_assert(contextTab); + for (i = 0; i < N_RCEC_TAB; i++) + contextTab[i] = NULL; + + /* Oldref group allocator */ + init_GroupAlloc ( &oldref_group_allocator, + sizeof(OldRef), + 1000 /* OldRefs per group */, + HG_(zalloc), + "libhb.event_map_init.3 (OldRef groups)", + HG_(free) ); + + /* Oldref tree */ + tl_assert(!oldrefTree); + oldrefTree = VG_(newSWA)( + HG_(zalloc), + "libhb.event_map_init.4 (oldref tree)", + HG_(free) + ); + tl_assert(oldrefTree); + + oldrefGen = 0; + oldrefGenIncAt = 0; + oldrefTreeN = 0; +} + +static void event_map__check_reference_counts ( Bool before ) +{ + RCEC* rcec; + OldRef* oldref; + Word i; + UWord nEnts = 0; + UWord keyW, valW; + + /* Set the 'check' reference counts to zero. Also, optionally + check that the real reference counts are non-zero. We allow + these to fall to zero before a GC, but the GC must get rid of + all those that are zero, hence none should be zero after a + GC. */ + for (i = 0; i < N_RCEC_TAB; i++) { + for (rcec = contextTab[i]; rcec; rcec = rcec->next) { + nEnts++; + tl_assert(rcec); + tl_assert(rcec->magic == RCEC_MAGIC); + if (!before) + tl_assert(rcec->rc > 0); + rcec->rcX = 0; + } + } + + /* check that the stats are sane */ + tl_assert(nEnts == stats__ctxt_tab_curr); + tl_assert(stats__ctxt_tab_curr <= stats__ctxt_tab_max); + + /* visit all the referencing points, inc check ref counts */ + VG_(initIterSWA)( oldrefTree ); + while (VG_(nextIterSWA)( oldrefTree, &keyW, &valW )) { + oldref = (OldRef*)valW; + tl_assert(oldref->magic == OldRef_MAGIC); + for (i = 0; i < N_OLDREF_ACCS; i++) { + Thr* aThr = ptr_and_UWord(oldref->accs[i].thr, ~3); + RCEC* aRef = ptr_and_UWord(oldref->accs[i].rcec, ~3); + if (aThr) { + tl_assert(aRef); + tl_assert(aRef->magic == RCEC_MAGIC); + aRef->rcX++; + } else { + tl_assert(!aRef); + } + } + } + + /* compare check ref counts with actual */ + for (i = 0; i < N_RCEC_TAB; i++) { + for (rcec = contextTab[i]; rcec; rcec = rcec->next) { + tl_assert(rcec->rc == rcec->rcX); + } + } +} + +__attribute__((noinline)) +static void event_map_maybe_GC ( void ) +{ + OldRef* oldref; + UWord keyW, valW, retained, maxGen; + XArray* refs2del; + Word i, j, n2del; + + UWord* genMap = NULL; + UWord genMap_min = 0; + UWord genMap_size = 0; + + if (LIKELY(oldrefTreeN < HG_(clo_conflict_cache_size))) + return; + + if (0) + VG_(printf)("libhb: event_map GC at size %lu\n", oldrefTreeN); + + /* Check for sane command line params. Limit values must match + those in hg_process_cmd_line_option. */ + tl_assert( HG_(clo_conflict_cache_size) >= 10*1000 ); + tl_assert( HG_(clo_conflict_cache_size) <= 10*1000*1000 ); + + /* Check our counting is sane (expensive) */ + if (CHECK_CEM) + tl_assert(oldrefTreeN == VG_(sizeSWA)( oldrefTree )); + + /* Check the reference counts (expensive) */ + if (CHECK_CEM) + event_map__check_reference_counts( True/*before*/ ); + + /* Compute the distribution of generation values in the ref tree. + There are likely only to be a few different generation numbers + in the whole tree, but we don't know what they are. Hence use a + dynamically resized array of counters. The array is genMap[0 + .. genMap_size-1], where genMap[0] is the count for the + generation number genMap_min, genMap[1] is the count for + genMap_min+1, etc. If a new number is seen outside the range + [genMap_min .. genMap_min + genMap_size - 1] then the array is + copied into a larger array, and genMap_min and genMap_size are + adjusted accordingly. */ + + /* genMap :: generation-number -> count-of-nodes-with-that-number */ + + VG_(initIterSWA)( oldrefTree ); + while ( VG_(nextIterSWA)( oldrefTree, &keyW, &valW )) { + + UWord ea, key; + oldref = (OldRef*)valW; + key = oldref->gen; + + /* BEGIN find 'ea', which is the index in genMap holding the + count for generation number 'key'. */ + if (UNLIKELY(genMap == NULL)) { + /* deal with the first key to be seen, so that the following + cases don't need to handle the complexity of a NULL count + array. */ + genMap_min = key; + genMap_size = 1; + genMap = HG_(zalloc)( "libhb.emmG.1a", + genMap_size * sizeof(UWord) ); + ea = 0; + if (0) VG_(printf)("(%lu) case 1 [%lu .. %lu]\n", + key, genMap_min, genMap_min+genMap_size- 1 ); + } + else + if (LIKELY(key >= genMap_min && key < genMap_min + genMap_size)) { + /* this is the expected (almost-always-happens) case: 'key' + is already mapped in the array. */ + ea = key - genMap_min; + } + else + if (key < genMap_min) { + /* 'key' appears before the start of the current array. + Extend the current array by allocating a larger one and + copying the current one to the upper end of it. */ + Word more; + UWord* map2; + more = genMap_min - key; + tl_assert(more > 0); + map2 = HG_(zalloc)( "libhb.emmG.1b", + (genMap_size + more) * sizeof(UWord) ); + VG_(memcpy)( &map2[more], genMap, genMap_size * sizeof(UWord) ); + HG_(free)( genMap ); + genMap = map2; + genMap_size += more; + genMap_min -= more; + ea = 0; + tl_assert(genMap_min == key); + if (0) VG_(printf)("(%lu) case 2 [%lu .. %lu]\n", + key, genMap_min, genMap_min+genMap_size- 1 ); + } + else { + /* 'key' appears after the end of the current array. Extend + the current array by allocating a larger one and copying + the current one to the lower end of it. */ + Word more; + UWord* map2; + tl_assert(key >= genMap_min + genMap_size); + more = key - (genMap_min + genMap_size) + 1; + tl_assert(more > 0); + map2 = HG_(zalloc)( "libhb.emmG.1c", + (genMap_size + more) * sizeof(UWord) ); + VG_(memcpy)( &map2[0], genMap, genMap_size * sizeof(UWord) ); + HG_(free)( genMap ); + genMap = map2; + genMap_size += more; + ea = genMap_size - 1;; + tl_assert(genMap_min + genMap_size - 1 == key); + if (0) VG_(printf)("(%lu) case 3 [%lu .. %lu]\n", + key, genMap_min, genMap_min+genMap_size- 1 ); + } + /* END find 'ea' from 'key' */ + + tl_assert(ea >= 0 && ea < genMap_size); + /* and the whole point of this elaborate computation of 'ea' is .. */ + genMap[ea]++; + } + + tl_assert(genMap); + tl_assert(genMap_size > 0); + + /* Sanity check what we just computed */ + { UWord sum = 0; + for (i = 0; i < genMap_size; i++) { + if (0) VG_(printf)(" xxx: gen %ld has %lu\n", + i + genMap_min, genMap[i] ); + sum += genMap[i]; + } + tl_assert(sum == oldrefTreeN); + } + + /* Figure out how many generations to throw away */ + retained = oldrefTreeN; + maxGen = 0; + + for (i = 0; i < genMap_size; i++) { + keyW = i + genMap_min; + valW = genMap[i]; + tl_assert(keyW > 0); /* can't allow a generation # 0 */ + if (0) VG_(printf)(" XXX: gen %lu has %lu\n", keyW, valW ); + tl_assert(keyW >= maxGen); + tl_assert(retained >= valW); + if (retained - valW + > (UWord)(HG_(clo_conflict_cache_size) + * EVENT_MAP_GC_DISCARD_FRACTION)) { + retained -= valW; + maxGen = keyW; + } else { + break; + } + } + + HG_(free)(genMap); + + tl_assert(retained >= 0 && retained <= oldrefTreeN); + + /* Now make up a big list of the oldrefTree entries we want to + delete. We can't simultaneously traverse the tree and delete + stuff from it, so first we need to copy them off somewhere + else. (sigh) */ + refs2del = VG_(newXA)( HG_(zalloc), "libhb.emmG.2", + HG_(free), sizeof(Addr) ); + + if (retained < oldrefTreeN) { + + /* This is the normal (expected) case. We discard any ref whose + generation number <= maxGen. */ + VG_(initIterSWA)( oldrefTree ); + while (VG_(nextIterSWA)( oldrefTree, &keyW, &valW )) { + oldref = (OldRef*)valW; + tl_assert(oldref->magic == OldRef_MAGIC); + if (oldref->gen <= maxGen) { + VG_(addToXA)( refs2del, &keyW ); + } + } + if (VG_(clo_verbosity) > 1) { + VG_(message)(Vg_DebugMsg, + "libhb: EvM GC: delete generations %lu and below, " + "retaining %lu entries", + maxGen, retained ); + } + + } else { + + static UInt rand_seed = 0; /* leave as static */ + + /* Degenerate case: there's only one generation in the entire + tree, so we need to have some other way of deciding which + refs to throw away. Just throw out half of them randomly. */ + tl_assert(retained == oldrefTreeN); + VG_(initIterSWA)( oldrefTree ); + while (VG_(nextIterSWA)( oldrefTree, &keyW, &valW )) { + UInt n; + oldref = (OldRef*)valW; + tl_assert(oldref->magic == OldRef_MAGIC); + n = VG_(random)( &rand_seed ); + if ((n & 0xFFF) < 0x800) { + VG_(addToXA)( refs2del, &keyW ); + retained--; + } + } + if (VG_(clo_verbosity) > 1) { + VG_(message)(Vg_DebugMsg, + "libhb: EvM GC: randomly delete half the entries, " + "retaining %lu entries", + retained ); + } + + } + + n2del = VG_(sizeXA)( refs2del ); + tl_assert(n2del == (Word)(oldrefTreeN - retained)); + + if (0) VG_(printf)("%s","deleting entries\n"); + for (i = 0; i < n2del; i++) { + Bool b; + Addr ga2del = *(Addr*)VG_(indexXA)( refs2del, i ); + b = VG_(delFromSWA)( oldrefTree, &keyW, &valW, ga2del ); + tl_assert(b); + tl_assert(keyW == ga2del); + oldref = (OldRef*)valW; + for (j = 0; j < N_OLDREF_ACCS; j++) { + Thr* aThr = ptr_and_UWord(oldref->accs[j].thr, ~3); + RCEC* aRef = ptr_and_UWord(oldref->accs[j].rcec, ~3); + if (aRef) { + tl_assert(aThr); + stats__ctxt_rcdec3++; + ctxt__rcdec( aRef ); + } else { + tl_assert(!aThr); + } + } + + free_OldRef( oldref ); + } + + VG_(deleteXA)( refs2del ); + + tl_assert( VG_(sizeSWA)( oldrefTree ) == retained ); + + oldrefTreeN = retained; + oldrefGenIncAt = oldrefTreeN; /* start new gen right away */ + + /* Throw away all RCECs with zero reference counts */ + for (i = 0; i < N_RCEC_TAB; i++) { + RCEC** pp = &contextTab[i]; + RCEC* p = *pp; + while (p) { + if (p->rc == 0) { + *pp = p->next; + free_RCEC(p); + p = *pp; + tl_assert(stats__ctxt_tab_curr > 0); + stats__ctxt_tab_curr--; + } else { + pp = &p->next; + p = p->next; + } + } + } + + /* Check the reference counts (expensive) */ + if (CHECK_CEM) + event_map__check_reference_counts( False/*after*/ ); + + //if (0) + //VG_(printf)("XXXX final sizes: oldrefTree %ld, contextTree %ld\n\n", + // VG_(OSetGen_Size)(oldrefTree), VG_(OSetGen_Size)(contextTree)); + +} + + +///////////////////////////////////////////////////////// +// // +// Core MSM // +// // +///////////////////////////////////////////////////////// + +/* Logic in msm_read/msm_write updated/verified after re-analysis, + 19 Nov 08. */ + +/* 19 Nov 08: it seems that MSM_RACE2ERR == 1 is a bad idea. When + nonzero, the effect is that when a race is detected for a location, + that location is put into a special 'error' state and no further + checking of it is done until it returns to a 'normal' state, which + requires it to be deallocated and reallocated. + + This is a bad idea, because of the interaction with suppressions. + Suppose there is a race on the location, but the error is + suppressed. The location now is marked as in-error. Now any + subsequent race -- including ones we want to see -- will never be + detected until the location is deallocated and reallocated. + + Hence set MSM_RACE2ERR to zero. This causes raced-on locations to + remain in the normal 'C' (constrained) state, but places on them + the constraint that the next accesses happen-after both the + existing constraint and the relevant vector clock of the thread + doing the racing access. +*/ +#define MSM_RACE2ERR 0 + +static ULong stats__msm_read = 0; +static ULong stats__msm_read_change = 0; +static ULong stats__msm_write = 0; +static ULong stats__msm_write_change = 0; + +__attribute__((noinline)) +static void record_race_info ( Thr* acc_thr, + Addr acc_addr, SizeT szB, Bool isWrite ) +{ + /* Call here to report a race. We just hand it onwards to + HG_(record_error_Race). If that in turn discovers that the + error is going to be collected, then that queries the + conflicting-event map. The alternative would be to query it + right here. But that causes a lot of pointless queries for + errors which will shortly be discarded as duplicates, and can + become a performance overhead; so we defer the query until we + know the error is not a duplicate. */ + tl_assert(acc_thr->opaque); + HG_(record_error_Race)( acc_thr->opaque, acc_addr, + szB, isWrite, NULL/*mb_lastlock*/ ); +} + +static Bool is_sane_SVal_C ( SVal sv ) { + POrd ord; + if (!SVal__isC(sv)) return True; + ord = VtsID__getOrdering( SVal__unC_Rmin(sv), SVal__unC_Wmin(sv) ); + if (ord == POrd_EQ || ord == POrd_LT) return True; + return False; +} + + +/* Compute new state following a read */ +static inline SVal msm_read ( SVal svOld, + /* The following are only needed for + creating error reports. */ + Thr* acc_thr, + Addr acc_addr, SizeT szB ) +{ + SVal svNew = SVal_INVALID; + stats__msm_read++; + + /* Redundant sanity check on the constraints */ + if (CHECK_MSM) { + tl_assert(is_sane_SVal_C(svOld)); + } + + if (SVal__isC(svOld)) { + POrd ord; + VtsID tviR = acc_thr->viR; + VtsID tviW = acc_thr->viW; + VtsID rmini = SVal__unC_Rmin(svOld); + VtsID wmini = SVal__unC_Wmin(svOld); + + ord = VtsID__getOrdering(rmini,tviR); + if (ord == POrd_EQ || ord == POrd_LT) { + /* no race */ + /* Note: RWLOCK subtlety: use tviW, not tviR */ + svNew = SVal__mkC( rmini, VtsID__join2(wmini, tviW) ); + goto out; + } else { + /* assert on sanity of constraints. */ + POrd ordxx = VtsID__getOrdering(rmini,wmini); + tl_assert(ordxx == POrd_EQ || ordxx == POrd_LT); + svNew = MSM_RACE2ERR + ? SVal__mkE() + /* see comments on corresponding fragment in + msm_write for explanation. */ + /* aggressive setting: */ + /* + : SVal__mkC( VtsID__join2(wmini,tviR), + VtsID__join2(wmini,tviW) ); + */ + /* "consistent" setting: */ + : SVal__mkC( VtsID__join2(rmini,tviR), + VtsID__join2(wmini,tviW) ); + record_race_info( acc_thr, acc_addr, szB, False/*!isWrite*/ ); + goto out; + } + } + if (SVal__isA(svOld)) { + /* reading no-access memory (sigh); leave unchanged */ + /* check for no pollution */ + tl_assert(svOld == SVal_NOACCESS); + svNew = SVal_NOACCESS; + goto out; + } + if (SVal__isE(svOld)) { + /* no race, location is already "in error" */ + svNew = SVal__mkE(); + goto out; + } + VG_(printf)("msm_read: bad svOld: 0x%016llx\n", svOld); + tl_assert(0); + + out: + if (CHECK_MSM) { + tl_assert(is_sane_SVal_C(svNew)); + } + tl_assert(svNew != SVal_INVALID); + if (svNew != svOld && HG_(clo_show_conflicts)) { + if (SVal__isC(svOld) && SVal__isC(svNew)) { + event_map_bind( acc_addr, szB, False/*!isWrite*/, acc_thr ); + stats__msm_read_change++; + } + } + return svNew; +} + + +/* Compute new state following a write */ +static inline SVal msm_write ( SVal svOld, + /* The following are only needed for + creating error reports. */ + Thr* acc_thr, + Addr acc_addr, SizeT szB ) +{ + SVal svNew = SVal_INVALID; + stats__msm_write++; + + /* Redundant sanity check on the constraints */ + if (CHECK_MSM) { + tl_assert(is_sane_SVal_C(svOld)); + } + + if (SVal__isC(svOld)) { + POrd ord; + VtsID tviW = acc_thr->viW; + VtsID wmini = SVal__unC_Wmin(svOld); + + ord = VtsID__getOrdering(wmini,tviW); + if (ord == POrd_EQ || ord == POrd_LT) { + /* no race */ + svNew = SVal__mkC( tviW, tviW ); + goto out; + } else { + VtsID tviR = acc_thr->viR; + VtsID rmini = SVal__unC_Rmin(svOld); + /* assert on sanity of constraints. */ + POrd ordxx = VtsID__getOrdering(rmini,wmini); + tl_assert(ordxx == POrd_EQ || ordxx == POrd_LT); + svNew = MSM_RACE2ERR + ? SVal__mkE() + /* One possibility is, after a race is seen, to + set the location's constraints as aggressively + (as far ahead) as possible. However, that just + causes lots more races to be reported, which is + very confusing. Hence don't do this. */ + /* + : SVal__mkC( VtsID__join2(wmini,tviR), + VtsID__join2(wmini,tviW) ); + */ + /* instead, re-set the constraints in a way which + is consistent with (ie, as they would have been + computed anyway) had no race been detected. */ + : SVal__mkC( VtsID__join2(rmini,tviR), + VtsID__join2(wmini,tviW) ); + record_race_info( acc_thr, acc_addr, szB, True/*isWrite*/ ); + goto out; + } + } + if (SVal__isA(svOld)) { + /* writing no-access memory (sigh); leave unchanged */ + /* check for no pollution */ + tl_assert(svOld == SVal_NOACCESS); + svNew = SVal_NOACCESS; + goto out; + } + if (SVal__isE(svOld)) { + /* no race, location is already "in error" */ + svNew = SVal__mkE(); + goto out; + } + VG_(printf)("msm_write: bad svOld: 0x%016llx\n", svOld); + tl_assert(0); + + out: + if (CHECK_MSM) { + tl_assert(is_sane_SVal_C(svNew)); + } + tl_assert(svNew != SVal_INVALID); + if (svNew != svOld && HG_(clo_show_conflicts)) { + if (SVal__isC(svOld) && SVal__isC(svNew)) { + event_map_bind( acc_addr, szB, True/*isWrite*/, acc_thr ); + stats__msm_write_change++; + } + } + return svNew; +} + + +///////////////////////////////////////////////////////// +// // +// Apply core MSM to specific memory locations // +// // +///////////////////////////////////////////////////////// + +/*------------- ZSM accesses: 8 bit apply ------------- */ + +void zsm_apply8___msm_read ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno, toff; + SVal svOld, svNew; + UShort descr; + stats__cline_read8s++; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0 .. 7 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_8_0 << toff)) )) { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_8(tree, toff, descr); + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + svOld = cl->svals[cloff]; + svNew = msm_read( svOld, thr,a,1 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; +} + +void zsm_apply8___msm_write ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno, toff; + SVal svOld, svNew; + UShort descr; + stats__cline_read8s++; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0 .. 7 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_8_0 << toff)) )) { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_8(tree, toff, descr); + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + svOld = cl->svals[cloff]; + svNew = msm_write( svOld, thr,a,1 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; +} + +/*------------- ZSM accesses: 16 bit apply ------------- */ + +void zsm_apply16___msm_read ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno, toff; + SVal svOld, svNew; + UShort descr; + stats__cline_read16s++; + if (UNLIKELY(!aligned16(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0, 2, 4 or 6 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_16_0 << toff)) )) { + if (valid_value_is_below_me_16(descr, toff)) { + goto slowcase; + } else { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_16(tree, toff, descr); + } + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + svOld = cl->svals[cloff]; + svNew = msm_read( svOld, thr,a,2 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; + return; + slowcase: /* misaligned, or must go further down the tree */ + stats__cline_16to8splits++; + zsm_apply8___msm_read( thr, a + 0 ); + zsm_apply8___msm_read( thr, a + 1 ); +} + +void zsm_apply16___msm_write ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno, toff; + SVal svOld, svNew; + UShort descr; + stats__cline_read16s++; + if (UNLIKELY(!aligned16(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0, 2, 4 or 6 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_16_0 << toff)) )) { + if (valid_value_is_below_me_16(descr, toff)) { + goto slowcase; + } else { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_16(tree, toff, descr); + } + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + svOld = cl->svals[cloff]; + svNew = msm_write( svOld, thr,a,2 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; + return; + slowcase: /* misaligned, or must go further down the tree */ + stats__cline_16to8splits++; + zsm_apply8___msm_write( thr, a + 0 ); + zsm_apply8___msm_write( thr, a + 1 ); +} + +/*------------- ZSM accesses: 32 bit apply ------------- */ + +void zsm_apply32___msm_read ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno, toff; + SVal svOld, svNew; + UShort descr; + if (UNLIKELY(!aligned32(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0 or 4 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_32_0 << toff)) )) { + if (valid_value_is_above_me_32(descr, toff)) { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_32(tree, toff, descr); + } else { + goto slowcase; + } + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + svOld = cl->svals[cloff]; + svNew = msm_read( svOld, thr,a,4 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; + return; + slowcase: /* misaligned, or must go further down the tree */ + stats__cline_32to16splits++; + zsm_apply16___msm_read( thr, a + 0 ); + zsm_apply16___msm_read( thr, a + 2 ); +} + +void zsm_apply32___msm_write ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno, toff; + SVal svOld, svNew; + UShort descr; + if (UNLIKELY(!aligned32(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0 or 4 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_32_0 << toff)) )) { + if (valid_value_is_above_me_32(descr, toff)) { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_32(tree, toff, descr); + } else { + goto slowcase; + } + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + svOld = cl->svals[cloff]; + svNew = msm_write( svOld, thr,a,4 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; + return; + slowcase: /* misaligned, or must go further down the tree */ + stats__cline_32to16splits++; + zsm_apply16___msm_write( thr, a + 0 ); + zsm_apply16___msm_write( thr, a + 2 ); +} + +/*------------- ZSM accesses: 64 bit apply ------------- */ + +void zsm_apply64___msm_read ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno; + //UWord toff; + SVal svOld, svNew; + UShort descr; + stats__cline_read64s++; + if (UNLIKELY(!aligned64(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + //toff = get_tree_offset(a); /* == 0, unused */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & TREE_DESCR_64) )) { + goto slowcase; + } + svOld = cl->svals[cloff]; + svNew = msm_read( svOld, thr,a,8 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; + return; + slowcase: /* misaligned, or must go further down the tree */ + stats__cline_64to32splits++; + zsm_apply32___msm_read( thr, a + 0 ); + zsm_apply32___msm_read( thr, a + 4 ); +} + +void zsm_apply64___msm_write ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno; + //UWord toff; + SVal svOld, svNew; + UShort descr; + stats__cline_read64s++; + if (UNLIKELY(!aligned64(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + //toff = get_tree_offset(a); /* == 0, unused */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & TREE_DESCR_64) )) { + goto slowcase; + } + svOld = cl->svals[cloff]; + svNew = msm_write( svOld, thr,a,8 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; + return; + slowcase: /* misaligned, or must go further down the tree */ + stats__cline_64to32splits++; + zsm_apply32___msm_write( thr, a + 0 ); + zsm_apply32___msm_write( thr, a + 4 ); +} + +/*--------------- ZSM accesses: 8 bit write --------------- */ + +static +void zsm_write8 ( Addr a, SVal svNew ) { + CacheLine* cl; + UWord cloff, tno, toff; + UShort descr; + stats__cline_set8s++; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0 .. 7 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_8_0 << toff)) )) { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_8(tree, toff, descr); + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; +} + +/*--------------- ZSM accesses: 16 bit write --------------- */ + +static +void zsm_write16 ( Addr a, SVal svNew ) { + CacheLine* cl; + UWord cloff, tno, toff; + UShort descr; + stats__cline_set16s++; + if (UNLIKELY(!aligned16(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0, 2, 4 or 6 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_16_0 << toff)) )) { + if (valid_value_is_below_me_16(descr, toff)) { + /* Writing at this level. Need to fix up 'descr'. */ + cl->descrs[tno] = pullup_descr_to_16(descr, toff); + /* At this point, the tree does not match cl->descr[tno] any + more. The assignments below will fix it up. */ + } else { + /* We can't indiscriminately write on the w16 node as in the + w64 case, as that might make the node inconsistent with + its parent. So first, pull down to this level. */ + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_16(tree, toff, descr); + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + } + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff + 0] = svNew; + cl->svals[cloff + 1] = SVal_INVALID; + return; + slowcase: /* misaligned */ + stats__cline_16to8splits++; + zsm_write8( a + 0, svNew ); + zsm_write8( a + 1, svNew ); +} + +/*--------------- ZSM accesses: 32 bit write --------------- */ + +static +void zsm_write32 ( Addr a, SVal svNew ) { + CacheLine* cl; + UWord cloff, tno, toff; + UShort descr; + stats__cline_set32s++; + if (UNLIKELY(!aligned32(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0 or 4 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_32_0 << toff)) )) { + if (valid_value_is_above_me_32(descr, toff)) { + /* We can't indiscriminately write on the w32 node as in the + w64 case, as that might make the node inconsistent with + its parent. So first, pull down to this level. */ + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_32(tree, toff, descr); + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } else { + /* Writing at this level. Need to fix up 'descr'. */ + cl->descrs[tno] = pullup_descr_to_32(descr, toff); + /* At this point, the tree does not match cl->descr[tno] any + more. The assignments below will fix it up. */ + } + } + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff + 0] = svNew; + cl->svals[cloff + 1] = SVal_INVALID; + cl->svals[cloff + 2] = SVal_INVALID; + cl->svals[cloff + 3] = SVal_INVALID; + return; + slowcase: /* misaligned */ + stats__cline_32to16splits++; + zsm_write16( a + 0, svNew ); + zsm_write16( a + 2, svNew ); +} + +/*--------------- ZSM accesses: 64 bit write --------------- */ + +static +void zsm_write64 ( Addr a, SVal svNew ) { + CacheLine* cl; + UWord cloff, tno; + //UWord toff; + stats__cline_set64s++; + if (UNLIKELY(!aligned64(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + //toff = get_tree_offset(a); /* == 0, unused */ + cl->descrs[tno] = TREE_DESCR_64; + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff + 0] = svNew; + cl->svals[cloff + 1] = SVal_INVALID; + cl->svals[cloff + 2] = SVal_INVALID; + cl->svals[cloff + 3] = SVal_INVALID; + cl->svals[cloff + 4] = SVal_INVALID; + cl->svals[cloff + 5] = SVal_INVALID; + cl->svals[cloff + 6] = SVal_INVALID; + cl->svals[cloff + 7] = SVal_INVALID; + return; + slowcase: /* misaligned */ + stats__cline_64to32splits++; + zsm_write32( a + 0, svNew ); + zsm_write32( a + 4, svNew ); +} + +/*------------- ZSM accesses: 8 bit read/copy ------------- */ + +static +SVal zsm_read8 ( Addr a ) { + CacheLine* cl; + UWord cloff, tno, toff; + UShort descr; + stats__cline_get8s++; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0 .. 7 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_8_0 << toff)) )) { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_8(tree, toff, descr); + } + return cl->svals[cloff]; +} + +static void zsm_copy8 ( Addr src, Addr dst, Bool uu_normalise ) { + SVal sv; + stats__cline_copy8s++; + sv = zsm_read8( src ); + zsm_write8( dst, sv ); +} + +/* ------------ Shadow memory range setting ops ------------ */ + +void zsm_apply_range___msm_read ( Thr* thr, + Addr a, SizeT len ) +{ + /* fast track a couple of common cases */ + if (len == 4 && aligned32(a)) { + zsm_apply32___msm_read( thr, a ); + return; + } + if (len == 8 && aligned64(a)) { + zsm_apply64___msm_read( thr, a ); + return; + } + + /* be completely general (but as efficient as possible) */ + if (len == 0) return; + + if (!aligned16(a) && len >= 1) { + zsm_apply8___msm_read( thr, a ); + a += 1; + len -= 1; + tl_assert(aligned16(a)); + } + if (len == 0) return; + + if (!aligned32(a) && len >= 2) { + zsm_apply16___msm_read( thr, a ); + a += 2; + len -= 2; + tl_assert(aligned32(a)); + } + if (len == 0) return; + + if (!aligned64(a) && len >= 4) { + zsm_apply32___msm_read( thr, a ); + a += 4; + len -= 4; + tl_assert(aligned64(a)); + } + if (len == 0) return; + + if (len >= 8) { + tl_assert(aligned64(a)); + while (len >= 8) { + zsm_apply64___msm_read( thr, a ); + a += 8; + len -= 8; + } + tl_assert(aligned64(a)); + } + if (len == 0) return; + + if (len >= 4) + tl_assert(aligned32(a)); + if (len >= 4) { + zsm_apply32___msm_read( thr, a ); + a += 4; + len -= 4; + } + if (len == 0) return; + + if (len >= 2) + tl_assert(aligned16(a)); + if (len >= 2) { + zsm_apply16___msm_read( thr, a ); + a += 2; + len -= 2; + } + if (len == 0) return; + + if (len >= 1) { + zsm_apply8___msm_read( thr, a ); + //a += 1; + len -= 1; + } + tl_assert(len == 0); +} + + + +void zsm_apply_range___msm_write ( Thr* thr, + Addr a, SizeT len ) +{ + /* fast track a couple of common cases */ + if (len == 4 && aligned32(a)) { + zsm_apply32___msm_write( thr, a ); + return; + } + if (len == 8 && aligned64(a)) { + zsm_apply64___msm_write( thr, a ); + return; + } + + /* be completely general (but as efficient as possible) */ + if (len == 0) return; + + if (!aligned16(a) && len >= 1) { + zsm_apply8___msm_write( thr, a ); + a += 1; + len -= 1; + tl_assert(aligned16(a)); + } + if (len == 0) return; + + if (!aligned32(a) && len >= 2) { + zsm_apply16___msm_write( thr, a ); + a += 2; + len -= 2; + tl_assert(aligned32(a)); + } + if (len == 0) return; + + if (!aligned64(a) && len >= 4) { + zsm_apply32___msm_write( thr, a ); + a += 4; + len -= 4; + tl_assert(aligned64(a)); + } + if (len == 0) return; + + if (len >= 8) { + tl_assert(aligned64(a)); + while (len >= 8) { + zsm_apply64___msm_write( thr, a ); + a += 8; + len -= 8; + } + tl_assert(aligned64(a)); + } + if (len == 0) return; + + if (len >= 4) + tl_assert(aligned32(a)); + if (len >= 4) { + zsm_apply32___msm_write( thr, a ); + a += 4; + len -= 4; + } + if (len == 0) return; + + if (len >= 2) + tl_assert(aligned16(a)); + if (len >= 2) { + zsm_apply16___msm_write( thr, a ); + a += 2; + len -= 2; + } + if (len == 0) return; + + if (len >= 1) { + zsm_apply8___msm_write( thr, a ); + //a += 1; + len -= 1; + } + tl_assert(len == 0); +} + + + + +/* Block-copy states (needed for implementing realloc()). */ + +static void zsm_copy_range ( Addr src, Addr dst, SizeT len ) +{ + SizeT i; + if (len == 0) + return; + + /* assert for non-overlappingness */ + tl_assert(src+len <= dst || dst+len <= src); + + /* To be simple, just copy byte by byte. But so as not to wreck + performance for later accesses to dst[0 .. len-1], normalise + destination lines as we finish with them, and also normalise the + line containing the first and last address. */ + for (i = 0; i < len; i++) { + Bool normalise + = get_cacheline_offset( dst+i+1 ) == 0 /* last in line */ + || i == 0 /* first in range */ + || i == len-1; /* last in range */ + zsm_copy8( src+i, dst+i, normalise ); + } +} + + +/* For setting address ranges to a given value. Has considerable + sophistication so as to avoid generating large numbers of pointless + cache loads/writebacks for large ranges. */ + +/* Do small ranges in-cache, in the obvious way. */ +static +void zsm_set_range_SMALL ( Addr a, SizeT len, SVal svNew ) +{ + /* fast track a couple of common cases */ + if (len == 4 && aligned32(a)) { + zsm_write32( a, svNew ); + return; + } + if (len == 8 && aligned64(a)) { + zsm_write64( a, svNew ); + return; + } + + /* be completely general (but as efficient as possible) */ + if (len == 0) return; + + if (!aligned16(a) && len >= 1) { + zsm_write8( a, svNew ); + a += 1; + len -= 1; + tl_assert(aligned16(a)); + } + if (len == 0) return; + + if (!aligned32(a) && len >= 2) { + zsm_write16( a, svNew ); + a += 2; + len -= 2; + tl_assert(aligned32(a)); + } + if (len == 0) return; + + if (!aligned64(a) && len >= 4) { + zsm_write32( a, svNew ); + a += 4; + len -= 4; + tl_assert(aligned64(a)); + } + if (len == 0) return; + + if (len >= 8) { + tl_assert(aligned64(a)); + while (len >= 8) { + zsm_write64( a, svNew ); + a += 8; + len -= 8; + } + tl_assert(aligned64(a)); + } + if (len == 0) return; + + if (len >= 4) + tl_assert(aligned32(a)); + if (len >= 4) { + zsm_write32( a, svNew ); + a += 4; + len -= 4; + } + if (len == 0) return; + + if (len >= 2) + tl_assert(aligned16(a)); + if (len >= 2) { + zsm_write16( a, svNew ); + a += 2; + len -= 2; + } + if (len == 0) return; + + if (len >= 1) { + zsm_write8( a, svNew ); + //a += 1; + len -= 1; + } + tl_assert(len == 0); +} + + +/* If we're doing a small range, hand off to zsm_set_range_SMALL. But + for larger ranges, try to operate directly on the out-of-cache + representation, rather than dragging lines into the cache, + overwriting them, and forcing them out. This turns out to be an + important performance optimisation. */ + +static void zsm_set_range ( Addr a, SizeT len, SVal svNew ) +{ + tl_assert(svNew != SVal_INVALID); + stats__cache_make_New_arange += (ULong)len; + + if (0 && len > 500) + VG_(printf)("make New ( %#lx, %ld )\n", a, len ); + + if (0) { + static UWord n_New_in_cache = 0; + static UWord n_New_not_in_cache = 0; + /* tag is 'a' with the in-line offset masked out, + eg a[31]..a[4] 0000 */ + Addr tag = a & ~(N_LINE_ARANGE - 1); + UWord wix = (a >> N_LINE_BITS) & (N_WAY_NENT - 1); + if (LIKELY(tag == cache_shmem.tags0[wix])) { + n_New_in_cache++; + } else { + n_New_not_in_cache++; + } + if (0 == ((n_New_in_cache + n_New_not_in_cache) % 100000)) + VG_(printf)("shadow_mem_make_New: IN %lu OUT %lu\n", + n_New_in_cache, n_New_not_in_cache ); + } + + if (LIKELY(len < 2 * N_LINE_ARANGE)) { + zsm_set_range_SMALL( a, len, svNew ); + } else { + Addr before_start = a; + Addr aligned_start = cacheline_ROUNDUP(a); + Addr after_start = cacheline_ROUNDDN(a + len); + UWord before_len = aligned_start - before_start; + UWord aligned_len = after_start - aligned_start; + UWord after_len = a + len - after_start; + tl_assert(before_start <= aligned_start); + tl_assert(aligned_start <= after_start); + tl_assert(before_len < N_LINE_ARANGE); + tl_assert(after_len < N_LINE_ARANGE); + tl_assert(get_cacheline_offset(aligned_start) == 0); + if (get_cacheline_offset(a) == 0) { + tl_assert(before_len == 0); + tl_assert(a == aligned_start); + } + if (get_cacheline_offset(a+len) == 0) { + tl_assert(after_len == 0); + tl_assert(after_start == a+len); + } + if (before_len > 0) { + zsm_set_range_SMALL( before_start, before_len, svNew ); + } + if (after_len > 0) { + zsm_set_range_SMALL( after_start, after_len, svNew ); + } + stats__cache_make_New_inZrep += (ULong)aligned_len; + + while (1) { + Addr tag; + UWord wix; + if (aligned_start >= after_start) + break; + tl_assert(get_cacheline_offset(aligned_start) == 0); + tag = aligned_start & ~(N_LINE_ARANGE - 1); + wix = (aligned_start >> N_LINE_BITS) & (N_WAY_NENT - 1); + if (tag == cache_shmem.tags0[wix]) { + UWord i; + for (i = 0; i < N_LINE_ARANGE / 8; i++) + zsm_write64( aligned_start + i * 8, svNew ); + } else { + UWord i; + Word zix; + SecMap* sm; + LineZ* lineZ; + /* This line is not in the cache. Do not force it in; instead + modify it in-place. */ + /* find the Z line to write in and rcdec it or the + associated F line. */ + find_Z_for_writing( &sm, &zix, tag ); + tl_assert(sm); + tl_assert(zix >= 0 && zix < N_SECMAP_ZLINES); + lineZ = &sm->linesZ[zix]; + lineZ->dict[0] = svNew; + lineZ->dict[1] = lineZ->dict[2] = lineZ->dict[3] = SVal_INVALID; + for (i = 0; i < N_LINE_ARANGE/4; i++) + lineZ->ix2s[i] = 0; /* all refer to dict[0] */ + rcinc_LineZ(lineZ); + } + aligned_start += N_LINE_ARANGE; + aligned_len -= N_LINE_ARANGE; + } + tl_assert(aligned_start == after_start); + tl_assert(aligned_len == 0); + } +} + + +///////////////////////////////////////////////////////// +// // +// Synchronisation objects // +// // +///////////////////////////////////////////////////////// + +// (UInt) `echo "Synchronisation object" | md5sum` +#define SO_MAGIC 0x56b3c5b0U + +struct _SO { + VtsID viR; /* r-clock of sender */ + VtsID viW; /* w-clock of sender */ + UInt magic; +}; + +static SO* SO__Alloc ( void ) { + SO* so = HG_(zalloc)( "libhb.SO__Alloc.1", sizeof(SO) ); + so->viR = VtsID_INVALID; + so->viW = VtsID_INVALID; + so->magic = SO_MAGIC; + return so; +} +static void SO__Dealloc ( SO* so ) { + tl_assert(so); + tl_assert(so->magic == SO_MAGIC); + if (so->viR == VtsID_INVALID) { + tl_assert(so->viW == VtsID_INVALID); + } else { + tl_assert(so->viW != VtsID_INVALID); + VtsID__rcdec(so->viR); + VtsID__rcdec(so->viW); + } + so->magic = 0; + HG_(free)( so ); +} + + +///////////////////////////////////////////////////////// +// // +// Top Level API // +// // +///////////////////////////////////////////////////////// + +static void show_thread_state ( HChar* str, Thr* t ) +{ + if (1) return; + if (t->viR == t->viW) { + VG_(printf)("thr \"%s\" %p has vi* %u==", str, t, t->viR ); + VtsID__pp( t->viR ); + VG_(printf)("%s","\n"); + } else { + VG_(printf)("thr \"%s\" %p has viR %u==", str, t, t->viR ); + VtsID__pp( t->viR ); + VG_(printf)(" viW %u==", t->viW); + VtsID__pp( t->viW ); + VG_(printf)("%s","\n"); + } +} + + +Thr* libhb_init ( + void (*get_stacktrace)( Thr*, Addr*, UWord ), + ExeContext* (*get_EC)( Thr* ) + ) +{ + Thr* thr; + VtsID vi; + tl_assert(get_stacktrace); + tl_assert(get_EC); + main_get_stacktrace = get_stacktrace; + main_get_EC = get_EC; + + // No need to initialise hg_wordfm. + // No need to initialise hg_wordset. + + vts_set_init(); + vts_tab_init(); + event_map_init(); + VtsID__invalidate_caches(); + + // initialise shadow memory + zsm_init( SVal__rcinc, SVal__rcdec ); + + thr = Thr__new(); + vi = VtsID__mk_Singleton( thr, 1 ); + thr->viR = vi; + thr->viW = vi; + VtsID__rcinc(thr->viR); + VtsID__rcinc(thr->viW); + + show_thread_state(" root", thr); + return thr; +} + +Thr* libhb_create ( Thr* parent ) +{ + /* The child's VTSs are copies of the parent's VTSs, but ticked at + the child's index. Since the child's index is guaranteed + unique, it has never been seen before, so the implicit value + before the tick is zero and after that is one. */ + Thr* child = Thr__new(); + + child->viR = VtsID__tick( parent->viR, child ); + child->viW = VtsID__tick( parent->viW, child ); + VtsID__rcinc(child->viR); + VtsID__rcinc(child->viW); + + tl_assert(VtsID__indexAt( child->viR, child ) == 1); + tl_assert(VtsID__indexAt( child->viW, child ) == 1); + + /* and the parent has to move along too */ + VtsID__rcdec(parent->viR); + VtsID__rcdec(parent->viW); + parent->viR = VtsID__tick( parent->viR, parent ); + parent->viW = VtsID__tick( parent->viW, parent ); + VtsID__rcinc(parent->viR); + VtsID__rcinc(parent->viW); + + show_thread_state(" child", child); + show_thread_state("parent", parent); + + return child; +} + +/* Shut down the library, and print stats (in fact that's _all_ + this is for. */ +void libhb_shutdown ( Bool show_stats ) +{ + if (show_stats) { + VG_(printf)("%s","<<< BEGIN libhb stats >>>\n"); + VG_(printf)(" secmaps: %'10lu allocd (%'12lu g-a-range)\n", + stats__secmaps_allocd, + stats__secmap_ga_space_covered); + VG_(printf)(" linesZ: %'10lu allocd (%'12lu bytes occupied)\n", + stats__secmap_linesZ_allocd, + stats__secmap_linesZ_bytes); + VG_(printf)(" linesF: %'10lu allocd (%'12lu bytes occupied)\n", + stats__secmap_linesF_allocd, + stats__secmap_linesF_bytes); + VG_(printf)(" secmaps: %'10lu iterator steppings\n", + stats__secmap_iterator_steppings); + VG_(printf)(" secmaps: %'10lu searches (%'12lu slow)\n", + stats__secmaps_search, stats__secmaps_search_slow); + + VG_(printf)("%s","\n"); + VG_(printf)(" cache: %'lu totrefs (%'lu misses)\n", + stats__cache_totrefs, stats__cache_totmisses ); + VG_(printf)(" cache: %'14lu Z-fetch, %'14lu F-fetch\n", + stats__cache_Z_fetches, stats__cache_F_fetches ); + VG_(printf)(" cache: %'14lu Z-wback, %'14lu F-wback\n", + stats__cache_Z_wbacks, stats__cache_F_wbacks ); + VG_(printf)(" cache: %'14lu invals, %'14lu flushes\n", + stats__cache_invals, stats__cache_flushes ); + VG_(printf)(" cache: %'14llu arange_New %'14llu direct-to-Zreps\n", + stats__cache_make_New_arange, + stats__cache_make_New_inZrep); + + VG_(printf)("%s","\n"); + VG_(printf)(" cline: %'10lu normalises\n", + stats__cline_normalises ); + VG_(printf)(" cline: rds 8/4/2/1: %'13lu %'13lu %'13lu %'13lu\n", + stats__cline_read64s, + stats__cline_read32s, + stats__cline_read16s, + stats__cline_read8s ); + VG_(printf)(" cline: wrs 8/4/2/1: %'13lu %'13lu %'13lu %'13lu\n", + stats__cline_write64s, + stats__cline_write32s, + stats__cline_write16s, + stats__cline_write8s ); + VG_(printf)(" cline: sets 8/4/2/1: %'13lu %'13lu %'13lu %'13lu\n", + stats__cline_set64s, + stats__cline_set32s, + stats__cline_set16s, + stats__cline_set8s ); + VG_(printf)(" cline: get1s %'lu, copy1s %'lu\n", + stats__cline_get8s, stats__cline_copy8s ); + VG_(printf)(" cline: splits: 8to4 %'12lu 4to2 %'12lu 2to1 %'12lu\n", + stats__cline_64to32splits, + stats__cline_32to16splits, + stats__cline_16to8splits ); + VG_(printf)(" cline: pulldowns: 8to4 %'12lu 4to2 %'12lu 2to1 %'12lu\n", + stats__cline_64to32pulldown, + stats__cline_32to16pulldown, + stats__cline_16to8pulldown ); + if (0) + VG_(printf)(" cline: sizeof(CacheLineZ) %ld, covers %ld bytes of arange\n", + (Word)sizeof(LineZ), (Word)N_LINE_ARANGE); + + VG_(printf)("%s","\n"); + + VG_(printf)(" libhb: %'13llu msm_read (%'llu changed)\n", + stats__msm_read, stats__msm_read_change); + VG_(printf)(" libhb: %'13llu msm_write (%'llu changed)\n", + stats__msm_write, stats__msm_write_change); + VG_(printf)(" libhb: %'13llu getOrd queries (%'llu misses)\n", + stats__getOrdering_queries, stats__getOrdering_misses); + VG_(printf)(" libhb: %'13llu join2 queries (%'llu misses)\n", + stats__join2_queries, stats__join2_misses); + + VG_(printf)("%s","\n"); + VG_(printf)( + " libhb: %ld entries in vts_table (approximately %lu bytes)\n", + VG_(sizeXA)( vts_tab ), VG_(sizeXA)( vts_tab ) * sizeof(VtsTE) + ); + VG_(printf)( " libhb: %lu entries in vts_set\n", + VG_(sizeFM)( vts_set ) ); + + VG_(printf)("%s","\n"); + VG_(printf)( " libhb: ctxt__rcdec: 1=%lu(%lu eq), 2=%lu, 3=%lu\n", + stats__ctxt_rcdec1, stats__ctxt_rcdec1_eq, + stats__ctxt_rcdec2, + stats__ctxt_rcdec3 ); + VG_(printf)( " libhb: ctxt__rcdec: calls %lu, discards %lu\n", + stats__ctxt_rcdec_calls, stats__ctxt_rcdec_discards); + VG_(printf)( " libhb: contextTab: %lu slots, %lu max ents\n", + (UWord)N_RCEC_TAB, + stats__ctxt_tab_curr ); + VG_(printf)( " libhb: contextTab: %lu queries, %lu cmps\n", + stats__ctxt_tab_qs, + stats__ctxt_tab_cmps ); +#if 0 + VG_(printf)("sizeof(AvlNode) = %lu\n", sizeof(AvlNode)); + VG_(printf)("sizeof(WordBag) = %lu\n", sizeof(WordBag)); + VG_(printf)("sizeof(MaybeWord) = %lu\n", sizeof(MaybeWord)); + VG_(printf)("sizeof(CacheLine) = %lu\n", sizeof(CacheLine)); + VG_(printf)("sizeof(LineZ) = %lu\n", sizeof(LineZ)); + VG_(printf)("sizeof(LineF) = %lu\n", sizeof(LineF)); + VG_(printf)("sizeof(SecMap) = %lu\n", sizeof(SecMap)); + VG_(printf)("sizeof(Cache) = %lu\n", sizeof(Cache)); + VG_(printf)("sizeof(SMCacheEnt) = %lu\n", sizeof(SMCacheEnt)); + VG_(printf)("sizeof(CountedSVal) = %lu\n", sizeof(CountedSVal)); + VG_(printf)("sizeof(VTS) = %lu\n", sizeof(VTS)); + VG_(printf)("sizeof(ScalarTS) = %lu\n", sizeof(ScalarTS)); + VG_(printf)("sizeof(VtsTE) = %lu\n", sizeof(VtsTE)); + VG_(printf)("sizeof(MSMInfo) = %lu\n", sizeof(MSMInfo)); + + VG_(printf)("sizeof(struct _XArray) = %lu\n", sizeof(struct _XArray)); + VG_(printf)("sizeof(struct _WordFM) = %lu\n", sizeof(struct _WordFM)); + VG_(printf)("sizeof(struct _Thr) = %lu\n", sizeof(struct _Thr)); + VG_(printf)("sizeof(struct _SO) = %lu\n", sizeof(struct _SO)); +#endif + + VG_(printf)("%s","<<< END libhb stats >>>\n"); + VG_(printf)("%s","\n"); + + } +} + +void libhb_async_exit ( Thr* thr ) +{ + /* is there anything we need to do? */ +} + +/* Both Segs and SOs point to VTSs. However, there is no sharing, so + a Seg that points at a VTS is its one-and-only owner, and ditto for + a SO that points at a VTS. */ + +SO* libhb_so_alloc ( void ) +{ + return SO__Alloc(); +} + +void libhb_so_dealloc ( SO* so ) +{ + tl_assert(so); + tl_assert(so->magic == SO_MAGIC); + SO__Dealloc(so); +} + +/* See comments in libhb.h for details on the meaning of + strong vs weak sends and strong vs weak receives. */ +void libhb_so_send ( Thr* thr, SO* so, Bool strong_send ) +{ + /* Copy the VTSs from 'thr' into the sync object, and then move + the thread along one step. */ + + tl_assert(so); + tl_assert(so->magic == SO_MAGIC); + + /* stay sane .. a thread's read-clock must always lead or be the + same as its write-clock */ + { POrd ord = VtsID__getOrdering(thr->viW, thr->viR); + tl_assert(ord == POrd_EQ || ord == POrd_LT); + } + + /* since we're overwriting the VtsIDs in the SO, we need to drop + any references made by the previous contents thereof */ + if (so->viR == VtsID_INVALID) { + tl_assert(so->viW == VtsID_INVALID); + so->viR = thr->viR; + so->viW = thr->viW; + VtsID__rcinc(so->viR); + VtsID__rcinc(so->viW); + } else { + /* In a strong send, we dump any previous VC in the SO and + install the sending thread's VC instead. For a weak send we + must join2 with what's already there. */ + tl_assert(so->viW != VtsID_INVALID); + VtsID__rcdec(so->viR); + VtsID__rcdec(so->viW); + so->viR = strong_send ? thr->viR : VtsID__join2( so->viR, thr->viR ); + so->viW = strong_send ? thr->viW : VtsID__join2( so->viW, thr->viW ); + VtsID__rcinc(so->viR); + VtsID__rcinc(so->viW); + } + + /* move both parent clocks along */ + VtsID__rcdec(thr->viR); + VtsID__rcdec(thr->viW); + thr->viR = VtsID__tick( thr->viR, thr ); + thr->viW = VtsID__tick( thr->viW, thr ); + VtsID__rcinc(thr->viR); + VtsID__rcinc(thr->viW); + if (strong_send) + show_thread_state("s-send", thr); + else + show_thread_state("w-send", thr); +} + +void libhb_so_recv ( Thr* thr, SO* so, Bool strong_recv ) +{ + tl_assert(so); + tl_assert(so->magic == SO_MAGIC); + + if (so->viR != VtsID_INVALID) { + tl_assert(so->viW != VtsID_INVALID); + + /* Weak receive (basically, an R-acquisition of a R-W lock). + This advances the read-clock of the receiver, but not the + write-clock. */ + VtsID__rcdec(thr->viR); + thr->viR = VtsID__join2( thr->viR, so->viR ); + VtsID__rcinc(thr->viR); + + /* For a strong receive, we also advance the receiver's write + clock, which means the receive as a whole is essentially + equivalent to a W-acquisition of a R-W lock. */ + if (strong_recv) { + VtsID__rcdec(thr->viW); + thr->viW = VtsID__join2( thr->viW, so->viW ); + VtsID__rcinc(thr->viW); + } + + if (strong_recv) + show_thread_state("s-recv", thr); + else + show_thread_state("w-recv", thr); + + } else { + tl_assert(so->viW == VtsID_INVALID); + /* Deal with degenerate case: 'so' has no vts, so there has been + no message posted to it. Just ignore this case. */ + show_thread_state("d-recv", thr); + } +} + +Bool libhb_so_everSent ( SO* so ) +{ + if (so->viR == VtsID_INVALID) { + tl_assert(so->viW == VtsID_INVALID); + return False; + } else { + tl_assert(so->viW != VtsID_INVALID); + return True; + } +} + +#define XXX1 0 // 0x67a106c +#define XXX2 0 + +static Bool TRACEME(Addr a, SizeT szB) { + if (XXX1 && a <= XXX1 && XXX1 <= a+szB) return True; + if (XXX2 && a <= XXX2 && XXX2 <= a+szB) return True; + return False; +} +static void trace ( Thr* thr, Addr a, SizeT szB, HChar* s ) { + SVal sv = zsm_read8(a); + VG_(printf)("thr %p (%#lx,%lu) %s: 0x%016llx ", thr,a,szB,s,sv); + show_thread_state("", thr); + VG_(printf)("%s","\n"); +} + +void libhb_range_new ( Thr* thr, Addr a, SizeT szB ) +{ + SVal sv = SVal__mkC(thr->viW, thr->viW); + tl_assert(is_sane_SVal_C(sv)); + if(TRACEME(a,szB))trace(thr,a,szB,"nw-before"); + zsm_set_range( a, szB, sv ); + if(TRACEME(a,szB))trace(thr,a,szB,"nw-after "); +} + +void libhb_range_noaccess ( Thr* thr, Addr a, SizeT szB ) +{ + if(TRACEME(a,szB))trace(thr,a,szB,"NA-before"); + zsm_set_range( a, szB, SVal__mkA() ); + if(TRACEME(a,szB))trace(thr,a,szB,"NA-after "); +} + +void* libhb_get_Thr_opaque ( Thr* thr ) { + tl_assert(thr); + return thr->opaque; +} + +void libhb_set_Thr_opaque ( Thr* thr, void* v ) { + tl_assert(thr); + thr->opaque = v; +} + +void libhb_copy_shadow_state ( Addr dst, Addr src, SizeT len ) +{ + zsm_copy_range(dst, src, len); +} + +void libhb_maybe_GC ( void ) +{ + event_map_maybe_GC(); + /* If there are still freelist entries available, no need for a + GC. */ + if (vts_tab_freelist != VtsID_INVALID) + return; + /* So all the table entries are full, and we're having to expand + the table. But did we hit the threshhold point yet? */ + if (VG_(sizeXA)( vts_tab ) < vts_next_GC_at) + return; + vts_tab__do_GC( False/*don't show stats*/ ); +} + + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// SECTION END main library // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + +/*--------------------------------------------------------------------*/ +/*--- end libhb_main.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/Makefile b/helgrind/Makefile new file mode 100644 index 0000000..95407f3 --- /dev/null +++ b/helgrind/Makefile @@ -0,0 +1,1787 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# helgrind/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# This file contains things shared by coregrind/Makefile.am and tool +# Makefile.am files. + + + +pkgdatadir = $(datadir)/valgrind +pkglibdir = $(libdir)/valgrind +pkgincludedir = $(includedir)/valgrind +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +DIST_COMMON = $(hginclude_HEADERS) $(noinst_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/Makefile.all.am \ + $(top_srcdir)/Makefile.core-tool.am \ + $(top_srcdir)/Makefile.flags.am $(top_srcdir)/Makefile.tool.am +noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ + $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) +#am__append_1 = helgrind-x86-linux vgpreload_helgrind-x86-linux.so +am__append_2 = helgrind-amd64-linux vgpreload_helgrind-amd64-linux.so +#am__append_3 = helgrind-ppc32-linux vgpreload_helgrind-ppc32-linux.so +#am__append_4 = helgrind-ppc64-linux vgpreload_helgrind-ppc64-linux.so +#am__append_5 = helgrind-ppc32-aix5 vgpreload_helgrind-ppc32-aix5.so +#am__append_6 = helgrind-ppc64-aix5 vgpreload_helgrind-ppc64-aix5.so +subdir = helgrind +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +#am__EXEEXT_1 = helgrind-x86-linux$(EXEEXT) \ +# vgpreload_helgrind-x86-linux.so$(EXEEXT) +am__EXEEXT_2 = helgrind-amd64-linux$(EXEEXT) \ + vgpreload_helgrind-amd64-linux.so$(EXEEXT) +#am__EXEEXT_3 = helgrind-ppc32-linux$(EXEEXT) \ +# vgpreload_helgrind-ppc32-linux.so$(EXEEXT) +#am__EXEEXT_4 = helgrind-ppc64-linux$(EXEEXT) \ +# vgpreload_helgrind-ppc64-linux.so$(EXEEXT) +#am__EXEEXT_5 = helgrind-ppc32-aix5$(EXEEXT) \ +# vgpreload_helgrind-ppc32-aix5.so$(EXEEXT) +#am__EXEEXT_6 = helgrind-ppc64-aix5$(EXEEXT) \ +# vgpreload_helgrind-ppc64-aix5.so$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +am__objects_1 = helgrind_amd64_linux-hg_basics.$(OBJEXT) \ + helgrind_amd64_linux-hg_lock_n_thread.$(OBJEXT) \ + helgrind_amd64_linux-hg_wordset.$(OBJEXT) \ + helgrind_amd64_linux-libhb_core.$(OBJEXT) \ + helgrind_amd64_linux-hg_errors.$(OBJEXT) \ + helgrind_amd64_linux-hg_main.$(OBJEXT) +am_helgrind_amd64_linux_OBJECTS = $(am__objects_1) +helgrind_amd64_linux_OBJECTS = $(am_helgrind_amd64_linux_OBJECTS) +am__DEPENDENCIES_1 = +am__DEPENDENCIES_2 = $(COREGRIND_LIBS_AMD64_LINUX) \ + $(am__DEPENDENCIES_1) +helgrind_amd64_linux_LINK = $(CCLD) $(helgrind_amd64_linux_CFLAGS) \ + $(CFLAGS) $(helgrind_amd64_linux_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_2 = helgrind_ppc32_aix5-hg_basics.$(OBJEXT) \ + helgrind_ppc32_aix5-hg_lock_n_thread.$(OBJEXT) \ + helgrind_ppc32_aix5-hg_wordset.$(OBJEXT) \ + helgrind_ppc32_aix5-libhb_core.$(OBJEXT) \ + helgrind_ppc32_aix5-hg_errors.$(OBJEXT) \ + helgrind_ppc32_aix5-hg_main.$(OBJEXT) +am_helgrind_ppc32_aix5_OBJECTS = $(am__objects_2) +helgrind_ppc32_aix5_OBJECTS = $(am_helgrind_ppc32_aix5_OBJECTS) +am__DEPENDENCIES_3 = $(COREGRIND_LIBS_PPC32_AIX5) \ + $(am__DEPENDENCIES_1) +helgrind_ppc32_aix5_LINK = $(CCLD) $(helgrind_ppc32_aix5_CFLAGS) \ + $(CFLAGS) $(helgrind_ppc32_aix5_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_3 = helgrind_ppc32_linux-hg_basics.$(OBJEXT) \ + helgrind_ppc32_linux-hg_lock_n_thread.$(OBJEXT) \ + helgrind_ppc32_linux-hg_wordset.$(OBJEXT) \ + helgrind_ppc32_linux-libhb_core.$(OBJEXT) \ + helgrind_ppc32_linux-hg_errors.$(OBJEXT) \ + helgrind_ppc32_linux-hg_main.$(OBJEXT) +am_helgrind_ppc32_linux_OBJECTS = $(am__objects_3) +helgrind_ppc32_linux_OBJECTS = $(am_helgrind_ppc32_linux_OBJECTS) +am__DEPENDENCIES_4 = $(COREGRIND_LIBS_PPC32_LINUX) \ + $(am__DEPENDENCIES_1) +helgrind_ppc32_linux_LINK = $(CCLD) $(helgrind_ppc32_linux_CFLAGS) \ + $(CFLAGS) $(helgrind_ppc32_linux_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_4 = helgrind_ppc64_aix5-hg_basics.$(OBJEXT) \ + helgrind_ppc64_aix5-hg_lock_n_thread.$(OBJEXT) \ + helgrind_ppc64_aix5-hg_wordset.$(OBJEXT) \ + helgrind_ppc64_aix5-libhb_core.$(OBJEXT) \ + helgrind_ppc64_aix5-hg_errors.$(OBJEXT) \ + helgrind_ppc64_aix5-hg_main.$(OBJEXT) +am_helgrind_ppc64_aix5_OBJECTS = $(am__objects_4) +helgrind_ppc64_aix5_OBJECTS = $(am_helgrind_ppc64_aix5_OBJECTS) +am__DEPENDENCIES_5 = $(COREGRIND_LIBS_PPC64_AIX5) \ + $(am__DEPENDENCIES_1) +helgrind_ppc64_aix5_LINK = $(CCLD) $(helgrind_ppc64_aix5_CFLAGS) \ + $(CFLAGS) $(helgrind_ppc64_aix5_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_5 = helgrind_ppc64_linux-hg_basics.$(OBJEXT) \ + helgrind_ppc64_linux-hg_lock_n_thread.$(OBJEXT) \ + helgrind_ppc64_linux-hg_wordset.$(OBJEXT) \ + helgrind_ppc64_linux-libhb_core.$(OBJEXT) \ + helgrind_ppc64_linux-hg_errors.$(OBJEXT) \ + helgrind_ppc64_linux-hg_main.$(OBJEXT) +am_helgrind_ppc64_linux_OBJECTS = $(am__objects_5) +helgrind_ppc64_linux_OBJECTS = $(am_helgrind_ppc64_linux_OBJECTS) +am__DEPENDENCIES_6 = $(COREGRIND_LIBS_PPC64_LINUX) \ + $(am__DEPENDENCIES_1) +helgrind_ppc64_linux_LINK = $(CCLD) $(helgrind_ppc64_linux_CFLAGS) \ + $(CFLAGS) $(helgrind_ppc64_linux_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_6 = helgrind_x86_linux-hg_basics.$(OBJEXT) \ + helgrind_x86_linux-hg_lock_n_thread.$(OBJEXT) \ + helgrind_x86_linux-hg_wordset.$(OBJEXT) \ + helgrind_x86_linux-libhb_core.$(OBJEXT) \ + helgrind_x86_linux-hg_errors.$(OBJEXT) \ + helgrind_x86_linux-hg_main.$(OBJEXT) +am_helgrind_x86_linux_OBJECTS = $(am__objects_6) +helgrind_x86_linux_OBJECTS = $(am_helgrind_x86_linux_OBJECTS) +am__DEPENDENCIES_7 = $(COREGRIND_LIBS_X86_LINUX) $(am__DEPENDENCIES_1) +helgrind_x86_linux_LINK = $(CCLD) $(helgrind_x86_linux_CFLAGS) \ + $(CFLAGS) $(helgrind_x86_linux_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_7 = \ + vgpreload_helgrind_amd64_linux_so-hg_intercepts.$(OBJEXT) +am_vgpreload_helgrind_amd64_linux_so_OBJECTS = $(am__objects_7) +vgpreload_helgrind_amd64_linux_so_OBJECTS = \ + $(am_vgpreload_helgrind_amd64_linux_so_OBJECTS) +vgpreload_helgrind_amd64_linux_so_LDADD = $(LDADD) +vgpreload_helgrind_amd64_linux_so_LINK = $(CCLD) \ + $(vgpreload_helgrind_amd64_linux_so_CFLAGS) $(CFLAGS) \ + $(vgpreload_helgrind_amd64_linux_so_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_8 = \ + vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.$(OBJEXT) +am_vgpreload_helgrind_ppc32_aix5_so_OBJECTS = $(am__objects_8) +vgpreload_helgrind_ppc32_aix5_so_OBJECTS = \ + $(am_vgpreload_helgrind_ppc32_aix5_so_OBJECTS) +vgpreload_helgrind_ppc32_aix5_so_LDADD = $(LDADD) +vgpreload_helgrind_ppc32_aix5_so_LINK = $(CCLD) \ + $(vgpreload_helgrind_ppc32_aix5_so_CFLAGS) $(CFLAGS) \ + $(vgpreload_helgrind_ppc32_aix5_so_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_9 = \ + vgpreload_helgrind_ppc32_linux_so-hg_intercepts.$(OBJEXT) +am_vgpreload_helgrind_ppc32_linux_so_OBJECTS = $(am__objects_9) +vgpreload_helgrind_ppc32_linux_so_OBJECTS = \ + $(am_vgpreload_helgrind_ppc32_linux_so_OBJECTS) +vgpreload_helgrind_ppc32_linux_so_LDADD = $(LDADD) +vgpreload_helgrind_ppc32_linux_so_LINK = $(CCLD) \ + $(vgpreload_helgrind_ppc32_linux_so_CFLAGS) $(CFLAGS) \ + $(vgpreload_helgrind_ppc32_linux_so_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_10 = \ + vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.$(OBJEXT) +am_vgpreload_helgrind_ppc64_aix5_so_OBJECTS = $(am__objects_10) +vgpreload_helgrind_ppc64_aix5_so_OBJECTS = \ + $(am_vgpreload_helgrind_ppc64_aix5_so_OBJECTS) +vgpreload_helgrind_ppc64_aix5_so_LDADD = $(LDADD) +vgpreload_helgrind_ppc64_aix5_so_LINK = $(CCLD) \ + $(vgpreload_helgrind_ppc64_aix5_so_CFLAGS) $(CFLAGS) \ + $(vgpreload_helgrind_ppc64_aix5_so_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_11 = \ + vgpreload_helgrind_ppc64_linux_so-hg_intercepts.$(OBJEXT) +am_vgpreload_helgrind_ppc64_linux_so_OBJECTS = $(am__objects_11) +vgpreload_helgrind_ppc64_linux_so_OBJECTS = \ + $(am_vgpreload_helgrind_ppc64_linux_so_OBJECTS) +vgpreload_helgrind_ppc64_linux_so_LDADD = $(LDADD) +vgpreload_helgrind_ppc64_linux_so_LINK = $(CCLD) \ + $(vgpreload_helgrind_ppc64_linux_so_CFLAGS) $(CFLAGS) \ + $(vgpreload_helgrind_ppc64_linux_so_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_12 = \ + vgpreload_helgrind_x86_linux_so-hg_intercepts.$(OBJEXT) +am_vgpreload_helgrind_x86_linux_so_OBJECTS = $(am__objects_12) +vgpreload_helgrind_x86_linux_so_OBJECTS = \ + $(am_vgpreload_helgrind_x86_linux_so_OBJECTS) +vgpreload_helgrind_x86_linux_so_LDADD = $(LDADD) +vgpreload_helgrind_x86_linux_so_LINK = $(CCLD) \ + $(vgpreload_helgrind_x86_linux_so_CFLAGS) $(CFLAGS) \ + $(vgpreload_helgrind_x86_linux_so_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(helgrind_amd64_linux_SOURCES) \ + $(helgrind_ppc32_aix5_SOURCES) $(helgrind_ppc32_linux_SOURCES) \ + $(helgrind_ppc64_aix5_SOURCES) $(helgrind_ppc64_linux_SOURCES) \ + $(helgrind_x86_linux_SOURCES) \ + $(vgpreload_helgrind_amd64_linux_so_SOURCES) \ + $(vgpreload_helgrind_ppc32_aix5_so_SOURCES) \ + $(vgpreload_helgrind_ppc32_linux_so_SOURCES) \ + $(vgpreload_helgrind_ppc64_aix5_so_SOURCES) \ + $(vgpreload_helgrind_ppc64_linux_so_SOURCES) \ + $(vgpreload_helgrind_x86_linux_so_SOURCES) +DIST_SOURCES = $(helgrind_amd64_linux_SOURCES) \ + $(helgrind_ppc32_aix5_SOURCES) $(helgrind_ppc32_linux_SOURCES) \ + $(helgrind_ppc64_aix5_SOURCES) $(helgrind_ppc64_linux_SOURCES) \ + $(helgrind_x86_linux_SOURCES) \ + $(vgpreload_helgrind_amd64_linux_so_SOURCES) \ + $(vgpreload_helgrind_ppc32_aix5_so_SOURCES) \ + $(vgpreload_helgrind_ppc32_linux_so_SOURCES) \ + $(vgpreload_helgrind_ppc64_aix5_so_SOURCES) \ + $(vgpreload_helgrind_ppc64_linux_so_SOURCES) \ + $(vgpreload_helgrind_x86_linux_so_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(hgincludedir)" +hgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(hginclude_HEADERS) $(noinst_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/steph/compile/valgrind/missing --run aclocal-1.10 +AMTAR = ${SHELL} /home/steph/compile/valgrind/missing --run tar +AR = /usr/bin/ar +AUTOCONF = ${SHELL} /home/steph/compile/valgrind/missing --run autoconf +AUTOHEADER = ${SHELL} /home/steph/compile/valgrind/missing --run autoheader +AUTOMAKE = ${SHELL} /home/steph/compile/valgrind/missing --run automake-1.10 +AWK = gawk +BOOST_CFLAGS = +BOOST_LIBS = -lboost_thread-mt -m64 +CC = gcc +CCAS = gcc +CCASDEPMODE = depmode=gcc3 +CCASFLAGS = -Wno-long-long +CCDEPMODE = depmode=gcc3 +CFLAGS = -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector +CPP = gcc -E +CPPFLAGS = +CXX = g++ +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DEFAULT_SUPP = exp-ptrcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DIFF = diff -u +DISTCHECK_CONFIGURE_FLAGS = --with-vex=$(top_srcdir)/VEX +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +FLAG_FNO_STACK_PROTECTOR = -fno-stack-protector +FLAG_M32 = -m32 +FLAG_M64 = -m64 +FLAG_MAIX32 = +FLAG_MAIX64 = +FLAG_MMMX = -mmmx +FLAG_MSSE = -msse +FLAG_UNLIMITED_INLINE_UNIT_GROWTH = --param inline-unit-growth=900 +FLAG_WDECL_AFTER_STMT = -Wdeclaration-after-statement +FLAG_W_EXTRA = -Wextra +FLAG_W_NO_FORMAT_ZERO_LENGTH = -Wno-format-zero-length +GDB = /usr/bin/gdb +GLIBC_VERSION = 2.8 +GREP = /bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LDFLAGS = +LIBOBJS = +LIBS = +LN_S = ln -s +LTLIBOBJS = +MAINT = # +MAKEINFO = ${SHELL} /home/steph/compile/valgrind/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +MPI_CC = mpicc +OBJEXT = o +PACKAGE = valgrind +PACKAGE_BUGREPORT = valgrind-users@lists.sourceforge.net +PACKAGE_NAME = Valgrind +PACKAGE_STRING = Valgrind 3.5.0.SVN +PACKAGE_TARNAME = valgrind +PACKAGE_VERSION = 3.5.0.SVN +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PKG_CONFIG = /usr/bin/pkg-config +PREFERRED_STACK_BOUNDARY = +QTCORE_CFLAGS = -DQT_SHARED -I/usr/include/QtCore +QTCORE_LIBS = -lQtCore +RANLIB = ranlib +SET_MAKE = +SHELL = /bin/sh +STRIP = +VALT_LOAD_ADDRESS = 0x38000000 +VERSION = 3.5.0.SVN +VEX_DIR = $(top_srcdir)/VEX +VGCONF_ARCH_PRI = amd64 +VGCONF_OS = linux +VGCONF_PLATFORM_PRI_CAPS = AMD64_LINUX +VGCONF_PLATFORM_SEC_CAPS = +abs_builddir = /home/steph/compile/valgrind/helgrind +abs_srcdir = /home/steph/compile/valgrind/helgrind +abs_top_builddir = /home/steph/compile/valgrind +abs_top_srcdir = /home/steph/compile/valgrind +ac_ct_CC = gcc +ac_ct_CXX = g++ +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /home/steph/compile/valgrind/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_builddir = .. +top_srcdir = .. +SUBDIRS = . tests docs +valdir = $(libdir)/valgrind +inplacedir = $(top_builddir)/.in_place + +# Baseline flags for all compilations. Aim here is to maximise +# performance and get whatever useful warnings we can out of gcc. +AM_CFLAGS_BASE = -O2 -g -Wmissing-prototypes -Wall -Wshadow \ + -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations \ + -Wno-format-zero-length \ + -fno-strict-aliasing + + +# These flags are used for building the preload shared objects. +# The aim is to give reasonable performance but also to have good +# stack traces, since users often see stack traces extending +# into (and through) the preloads. +AM_CFLAGS_PIC = -O -g -fpic -fno-omit-frame-pointer -fno-strict-aliasing + +# Flags for specific targets. +# +# Nb: the AM_CPPFLAGS_* values are suitable for building tools and auxprogs. +# For building the core, coregrind/Makefile.am files add some extra things. +# +# Also: in newer versions of automake (1.10 onwards?) asm files ending with +# '.S' are considered "pre-processed" (as opposed to those ending in '.s') +# and so the CPPFLAGS are passed to the assembler. But this is not true for +# older automakes (e.g. 1.8.5, 1.9.6), sigh. So we include +# AM_CPPFLAGS_<PLATFORM> in each AM_CCASFLAGS_<PLATFORM> variable. This +# means some of the flags are duplicated on systems with newer versions of +# automake, but this does not really matter and seems hard to avoid. +AM_CPPFLAGS_COMMON = \ + -I$(top_srcdir) \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/VEX/pub + +AM_FLAG_M3264_X86_LINUX = -m32 +AM_CPPFLAGS_X86_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_x86=1 \ + -DVGO_linux=1 \ + -DVGP_x86_linux=1 + +AM_CFLAGS_X86_LINUX = -m32 \ + $(AM_CFLAGS_BASE) + +AM_CCASFLAGS_X86_LINUX = $(AM_CPPFLAGS_X86_LINUX) -m32 -g +AM_FLAG_M3264_AMD64_LINUX = -m64 +AM_CPPFLAGS_AMD64_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_amd64=1 \ + -DVGO_linux=1 \ + -DVGP_amd64_linux=1 + +AM_CFLAGS_AMD64_LINUX = -m64 -fomit-frame-pointer \ + $(AM_CFLAGS_BASE) + +AM_CCASFLAGS_AMD64_LINUX = $(AM_CPPFLAGS_AMD64_LINUX) -m64 -g +AM_FLAG_M3264_PPC32_LINUX = -m32 +AM_CPPFLAGS_PPC32_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc32=1 \ + -DVGO_linux=1 \ + -DVGP_ppc32_linux=1 + +AM_CFLAGS_PPC32_LINUX = -m32 $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC32_LINUX = $(AM_CPPFLAGS_PPC32_LINUX) -m32 -g +AM_FLAG_M3264_PPC64_LINUX = -m64 +AM_CPPFLAGS_PPC64_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc64=1 \ + -DVGO_linux=1 \ + -DVGP_ppc64_linux=1 + +AM_CFLAGS_PPC64_LINUX = -m64 $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC64_LINUX = $(AM_CPPFLAGS_PPC64_LINUX) -m64 -g +AM_FLAG_M3264_PPC32_AIX5 = +AM_CPPFLAGS_PPC32_AIX5 = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc32=1 \ + -DVGO_aix5=1 \ + -DVGP_ppc32_aix5=1 + +AM_CFLAGS_PPC32_AIX5 = -mcpu=powerpc $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC32_AIX5 = $(AM_CPPFLAGS_PPC32_AIX5) \ + -mcpu=powerpc -g + +AM_FLAG_M3264_PPC64_AIX5 = +AM_CPPFLAGS_PPC64_AIX5 = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc64=1 \ + -DVGO_aix5=1 \ + -DVGP_ppc64_aix5=1 + +AM_CFLAGS_PPC64_AIX5 = -mcpu=powerpc64 $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC64_AIX5 = $(AM_CPPFLAGS_PPC64_AIX5) \ + -mcpu=powerpc64 -g + + +# Flags for the primary target. These must be used to build the +# regtests and performance tests. In fact, these must be used to +# build anything which is built only once on a dual-arch build. +# +AM_FLAG_M3264_PRI = $(AM_FLAG_M3264_AMD64_LINUX) +AM_CPPFLAGS_PRI = $(AM_CPPFLAGS_AMD64_LINUX) +AM_CFLAGS_PRI = $(AM_CFLAGS_AMD64_LINUX) +AM_CCASFLAGS_PRI = $(AM_CCASFLAGS_AMD64_LINUX) +AM_FLAG_M3264_SEC = +#AM_FLAG_M3264_SEC = $(AM_FLAG_M3264_) + +# Baseline link flags for making dynamic shared objects. +# +PRELOAD_LDFLAGS_COMMON_LINUX = -nodefaultlibs -shared -Wl,-z,interpose,-z,initfirst +PRELOAD_LDFLAGS_COMMON_AIX5 = -nodefaultlibs -shared -Wl,-G -Wl,-bnogc +PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) -m32 +PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) -m64 +PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) -m32 +PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) -m64 +PRELOAD_LDFLAGS_PPC32_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) +PRELOAD_LDFLAGS_PPC64_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) +LIBREPLACEMALLOC_X86_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-x86-linux.a + +LIBREPLACEMALLOC_AMD64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-amd64-linux.a + +LIBREPLACEMALLOC_PPC32_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc32-linux.a + +LIBREPLACEMALLOC_PPC64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a + +LIBREPLACEMALLOC_PPC32_AIX5 = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc32-aix5.a + +LIBREPLACEMALLOC_PPC64_AIX5 = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-aix5.a + +COREGRIND_LIBS_X86_LINUX = \ + $(top_builddir)/coregrind/libcoregrind-x86-linux.a \ + $(top_srcdir)/VEX/libvex-x86-linux.a + +COREGRIND_LIBS_AMD64_LINUX = \ + $(top_builddir)/coregrind/libcoregrind-amd64-linux.a \ + $(top_srcdir)/VEX/libvex-amd64-linux.a + +COREGRIND_LIBS_PPC32_LINUX = \ + $(top_builddir)/coregrind/libcoregrind-ppc32-linux.a \ + $(top_srcdir)/VEX/libvex-ppc32-linux.a + +COREGRIND_LIBS_PPC64_LINUX = \ + $(top_builddir)/coregrind/libcoregrind-ppc64-linux.a \ + $(top_srcdir)/VEX/libvex-ppc64-linux.a + +COREGRIND_LIBS_PPC32_AIX5 = \ + $(top_builddir)/coregrind/libcoregrind-ppc32-aix5.a \ + $(top_srcdir)/VEX/libvex-ppc32-aix5.a + +COREGRIND_LIBS_PPC64_AIX5 = \ + $(top_builddir)/coregrind/libcoregrind-ppc64-aix5.a \ + $(top_srcdir)/VEX/libvex-ppc64-aix5.a + +TOOL_LDADD_COMMON = -lgcc +TOOL_LDFLAGS_COMMON_LINUX = -static \ + -Wl,-defsym,valt_load_address=0x38000000 \ + -nodefaultlibs -nostartfiles -u _start + +TOOL_LDFLAGS_COMMON_AIX5 = -static -Wl,-e_start_valgrind +TOOL_LDADD_X86_LINUX = $(COREGRIND_LIBS_X86_LINUX) $(TOOL_LDADD_COMMON) +TOOL_LDFLAGS_X86_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) -m32 \ + -Wl,-T,$(top_builddir)/valt_load_address_x86_linux.lds + +TOOL_LDADD_AMD64_LINUX = $(COREGRIND_LIBS_AMD64_LINUX) $(TOOL_LDADD_COMMON) +TOOL_LDFLAGS_AMD64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) -m64 \ + -Wl,-T,$(top_builddir)/valt_load_address_amd64_linux.lds + +TOOL_LDADD_PPC32_LINUX = $(COREGRIND_LIBS_PPC32_LINUX) $(TOOL_LDADD_COMMON) +TOOL_LDFLAGS_PPC32_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) -m32 \ + -Wl,-T,$(top_builddir)/valt_load_address_ppc32_linux.lds + +TOOL_LDADD_PPC64_LINUX = $(COREGRIND_LIBS_PPC64_LINUX) $(TOOL_LDADD_COMMON) +TOOL_LDFLAGS_PPC64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) -m64 \ + -Wl,-T,$(top_builddir)/valt_load_address_ppc64_linux.lds + +TOOL_LDADD_PPC32_AIX5 = $(COREGRIND_LIBS_PPC32_AIX5) $(TOOL_LDADD_COMMON) +TOOL_LDFLAGS_PPC32_AIX5 = \ + $(TOOL_LDFLAGS_COMMON_AIX5) + +TOOL_LDADD_PPC64_AIX5 = $(COREGRIND_LIBS_PPC64_AIX5) $(TOOL_LDADD_COMMON) +TOOL_LDFLAGS_PPC64_AIX5 = \ + $(TOOL_LDFLAGS_COMMON_AIX5) -Wl,-bbigtoc + +LIBREPLACEMALLOC_LDFLAGS_X86_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_X86_LINUX) \ + -Wl,--no-whole-archive + +LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_AMD64_LINUX) \ + -Wl,--no-whole-archive + +LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_PPC32_LINUX) \ + -Wl,--no-whole-archive + +LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_PPC64_LINUX) \ + -Wl,--no-whole-archive + +LIBREPLACEMALLOC_LDFLAGS_PPC32_AIX5 = \ + $(LIBREPLACEMALLOC_PPC32_AIX5) + +LIBREPLACEMALLOC_LDFLAGS_PPC64_AIX5 = \ + $(LIBREPLACEMALLOC_PPC64_AIX5) + +VGPRELOAD_HELGRIND_SOURCES_COMMON = hg_intercepts.c +vgpreload_helgrind_x86_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_x86_linux_so_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX) +vgpreload_helgrind_x86_linux_so_CFLAGS = $(AM_CFLAGS_X86_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_x86_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_X86_LINUX) +vgpreload_helgrind_x86_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_X86_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_X86_LINUX) + +vgpreload_helgrind_amd64_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_amd64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX) +vgpreload_helgrind_amd64_linux_so_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_amd64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_AMD64_LINUX) +vgpreload_helgrind_amd64_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_AMD64_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX) + +vgpreload_helgrind_ppc32_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc32_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX) +vgpreload_helgrind_ppc32_linux_so_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc32_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_LINUX) +vgpreload_helgrind_ppc32_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC32_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX) + +vgpreload_helgrind_ppc64_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX) +vgpreload_helgrind_ppc64_linux_so_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_LINUX) +vgpreload_helgrind_ppc64_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC64_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX) + +vgpreload_helgrind_ppc32_aix5_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc32_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5) +vgpreload_helgrind_ppc32_aix5_so_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc32_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_AIX5) +vgpreload_helgrind_ppc32_aix5_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC32_AIX5) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC32_AIX5) + +vgpreload_helgrind_ppc64_aix5_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc64_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5) +vgpreload_helgrind_ppc64_aix5_so_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc64_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_AIX5) +vgpreload_helgrind_ppc64_aix5_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC64_AIX5) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC64_AIX5) + +HELGRIND_SOURCES_COMMON = \ + hg_basics.c hg_lock_n_thread.c hg_wordset.c libhb_core.c \ + hg_errors.c hg_main.c + +helgrind_x86_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_x86_linux_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX) +helgrind_x86_linux_CFLAGS = $(AM_CFLAGS_X86_LINUX) -O2 +helgrind_x86_linux_DEPENDENCIES = $(COREGRIND_LIBS_X86_LINUX) +helgrind_x86_linux_LDADD = $(TOOL_LDADD_X86_LINUX) +helgrind_x86_linux_LDFLAGS = $(TOOL_LDFLAGS_X86_LINUX) +helgrind_amd64_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_amd64_linux_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX) +helgrind_amd64_linux_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) -O2 +helgrind_amd64_linux_DEPENDENCIES = $(COREGRIND_LIBS_AMD64_LINUX) +helgrind_amd64_linux_LDADD = $(TOOL_LDADD_AMD64_LINUX) +helgrind_amd64_linux_LDFLAGS = $(TOOL_LDFLAGS_AMD64_LINUX) +helgrind_ppc32_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc32_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX) +helgrind_ppc32_linux_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) -O2 +helgrind_ppc32_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_LINUX) +helgrind_ppc32_linux_LDADD = $(TOOL_LDADD_PPC32_LINUX) +helgrind_ppc32_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC32_LINUX) +helgrind_ppc64_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc64_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX) +helgrind_ppc64_linux_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) -O2 +helgrind_ppc64_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_LINUX) +helgrind_ppc64_linux_LDADD = $(TOOL_LDADD_PPC64_LINUX) +helgrind_ppc64_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC64_LINUX) +helgrind_ppc32_aix5_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc32_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5) +helgrind_ppc32_aix5_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) -O2 +helgrind_ppc32_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_AIX5) +helgrind_ppc32_aix5_LDADD = $(TOOL_LDADD_PPC32_AIX5) +helgrind_ppc32_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC32_AIX5) +helgrind_ppc64_aix5_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc64_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5) +helgrind_ppc64_aix5_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) -O2 +helgrind_ppc64_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_AIX5) +helgrind_ppc64_aix5_LDADD = $(TOOL_LDADD_PPC64_AIX5) +helgrind_ppc64_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC64_AIX5) +hgincludedir = $(includedir)/valgrind +hginclude_HEADERS = helgrind.h +noinst_HEADERS = \ + hg_basics.h hg_lock_n_thread.h hg_errors.h hg_wordset.h \ + libhb.h + +EXTRA_DIST = README_MSMProp2.txt README_YARD.txt +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/Makefile.tool.am $(top_srcdir)/Makefile.all.am $(top_srcdir)/Makefile.flags.am $(top_srcdir)/Makefile.core-tool.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign helgrind/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign helgrind/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) +helgrind-amd64-linux$(EXEEXT): $(helgrind_amd64_linux_OBJECTS) $(helgrind_amd64_linux_DEPENDENCIES) + @rm -f helgrind-amd64-linux$(EXEEXT) + $(helgrind_amd64_linux_LINK) $(helgrind_amd64_linux_OBJECTS) $(helgrind_amd64_linux_LDADD) $(LIBS) +helgrind-ppc32-aix5$(EXEEXT): $(helgrind_ppc32_aix5_OBJECTS) $(helgrind_ppc32_aix5_DEPENDENCIES) + @rm -f helgrind-ppc32-aix5$(EXEEXT) + $(helgrind_ppc32_aix5_LINK) $(helgrind_ppc32_aix5_OBJECTS) $(helgrind_ppc32_aix5_LDADD) $(LIBS) +helgrind-ppc32-linux$(EXEEXT): $(helgrind_ppc32_linux_OBJECTS) $(helgrind_ppc32_linux_DEPENDENCIES) + @rm -f helgrind-ppc32-linux$(EXEEXT) + $(helgrind_ppc32_linux_LINK) $(helgrind_ppc32_linux_OBJECTS) $(helgrind_ppc32_linux_LDADD) $(LIBS) +helgrind-ppc64-aix5$(EXEEXT): $(helgrind_ppc64_aix5_OBJECTS) $(helgrind_ppc64_aix5_DEPENDENCIES) + @rm -f helgrind-ppc64-aix5$(EXEEXT) + $(helgrind_ppc64_aix5_LINK) $(helgrind_ppc64_aix5_OBJECTS) $(helgrind_ppc64_aix5_LDADD) $(LIBS) +helgrind-ppc64-linux$(EXEEXT): $(helgrind_ppc64_linux_OBJECTS) $(helgrind_ppc64_linux_DEPENDENCIES) + @rm -f helgrind-ppc64-linux$(EXEEXT) + $(helgrind_ppc64_linux_LINK) $(helgrind_ppc64_linux_OBJECTS) $(helgrind_ppc64_linux_LDADD) $(LIBS) +helgrind-x86-linux$(EXEEXT): $(helgrind_x86_linux_OBJECTS) $(helgrind_x86_linux_DEPENDENCIES) + @rm -f helgrind-x86-linux$(EXEEXT) + $(helgrind_x86_linux_LINK) $(helgrind_x86_linux_OBJECTS) $(helgrind_x86_linux_LDADD) $(LIBS) +vgpreload_helgrind-amd64-linux.so$(EXEEXT): $(vgpreload_helgrind_amd64_linux_so_OBJECTS) $(vgpreload_helgrind_amd64_linux_so_DEPENDENCIES) + @rm -f vgpreload_helgrind-amd64-linux.so$(EXEEXT) + $(vgpreload_helgrind_amd64_linux_so_LINK) $(vgpreload_helgrind_amd64_linux_so_OBJECTS) $(vgpreload_helgrind_amd64_linux_so_LDADD) $(LIBS) +vgpreload_helgrind-ppc32-aix5.so$(EXEEXT): $(vgpreload_helgrind_ppc32_aix5_so_OBJECTS) $(vgpreload_helgrind_ppc32_aix5_so_DEPENDENCIES) + @rm -f vgpreload_helgrind-ppc32-aix5.so$(EXEEXT) + $(vgpreload_helgrind_ppc32_aix5_so_LINK) $(vgpreload_helgrind_ppc32_aix5_so_OBJECTS) $(vgpreload_helgrind_ppc32_aix5_so_LDADD) $(LIBS) +vgpreload_helgrind-ppc32-linux.so$(EXEEXT): $(vgpreload_helgrind_ppc32_linux_so_OBJECTS) $(vgpreload_helgrind_ppc32_linux_so_DEPENDENCIES) + @rm -f vgpreload_helgrind-ppc32-linux.so$(EXEEXT) + $(vgpreload_helgrind_ppc32_linux_so_LINK) $(vgpreload_helgrind_ppc32_linux_so_OBJECTS) $(vgpreload_helgrind_ppc32_linux_so_LDADD) $(LIBS) +vgpreload_helgrind-ppc64-aix5.so$(EXEEXT): $(vgpreload_helgrind_ppc64_aix5_so_OBJECTS) $(vgpreload_helgrind_ppc64_aix5_so_DEPENDENCIES) + @rm -f vgpreload_helgrind-ppc64-aix5.so$(EXEEXT) + $(vgpreload_helgrind_ppc64_aix5_so_LINK) $(vgpreload_helgrind_ppc64_aix5_so_OBJECTS) $(vgpreload_helgrind_ppc64_aix5_so_LDADD) $(LIBS) +vgpreload_helgrind-ppc64-linux.so$(EXEEXT): $(vgpreload_helgrind_ppc64_linux_so_OBJECTS) $(vgpreload_helgrind_ppc64_linux_so_DEPENDENCIES) + @rm -f vgpreload_helgrind-ppc64-linux.so$(EXEEXT) + $(vgpreload_helgrind_ppc64_linux_so_LINK) $(vgpreload_helgrind_ppc64_linux_so_OBJECTS) $(vgpreload_helgrind_ppc64_linux_so_LDADD) $(LIBS) +vgpreload_helgrind-x86-linux.so$(EXEEXT): $(vgpreload_helgrind_x86_linux_so_OBJECTS) $(vgpreload_helgrind_x86_linux_so_DEPENDENCIES) + @rm -f vgpreload_helgrind-x86-linux.so$(EXEEXT) + $(vgpreload_helgrind_x86_linux_so_LINK) $(vgpreload_helgrind_x86_linux_so_OBJECTS) $(vgpreload_helgrind_x86_linux_so_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/helgrind_amd64_linux-hg_basics.Po +include ./$(DEPDIR)/helgrind_amd64_linux-hg_errors.Po +include ./$(DEPDIR)/helgrind_amd64_linux-hg_lock_n_thread.Po +include ./$(DEPDIR)/helgrind_amd64_linux-hg_main.Po +include ./$(DEPDIR)/helgrind_amd64_linux-hg_wordset.Po +include ./$(DEPDIR)/helgrind_amd64_linux-libhb_core.Po +include ./$(DEPDIR)/helgrind_ppc32_aix5-hg_basics.Po +include ./$(DEPDIR)/helgrind_ppc32_aix5-hg_errors.Po +include ./$(DEPDIR)/helgrind_ppc32_aix5-hg_lock_n_thread.Po +include ./$(DEPDIR)/helgrind_ppc32_aix5-hg_main.Po +include ./$(DEPDIR)/helgrind_ppc32_aix5-hg_wordset.Po +include ./$(DEPDIR)/helgrind_ppc32_aix5-libhb_core.Po +include ./$(DEPDIR)/helgrind_ppc32_linux-hg_basics.Po +include ./$(DEPDIR)/helgrind_ppc32_linux-hg_errors.Po +include ./$(DEPDIR)/helgrind_ppc32_linux-hg_lock_n_thread.Po +include ./$(DEPDIR)/helgrind_ppc32_linux-hg_main.Po +include ./$(DEPDIR)/helgrind_ppc32_linux-hg_wordset.Po +include ./$(DEPDIR)/helgrind_ppc32_linux-libhb_core.Po +include ./$(DEPDIR)/helgrind_ppc64_aix5-hg_basics.Po +include ./$(DEPDIR)/helgrind_ppc64_aix5-hg_errors.Po +include ./$(DEPDIR)/helgrind_ppc64_aix5-hg_lock_n_thread.Po +include ./$(DEPDIR)/helgrind_ppc64_aix5-hg_main.Po +include ./$(DEPDIR)/helgrind_ppc64_aix5-hg_wordset.Po +include ./$(DEPDIR)/helgrind_ppc64_aix5-libhb_core.Po +include ./$(DEPDIR)/helgrind_ppc64_linux-hg_basics.Po +include ./$(DEPDIR)/helgrind_ppc64_linux-hg_errors.Po +include ./$(DEPDIR)/helgrind_ppc64_linux-hg_lock_n_thread.Po +include ./$(DEPDIR)/helgrind_ppc64_linux-hg_main.Po +include ./$(DEPDIR)/helgrind_ppc64_linux-hg_wordset.Po +include ./$(DEPDIR)/helgrind_ppc64_linux-libhb_core.Po +include ./$(DEPDIR)/helgrind_x86_linux-hg_basics.Po +include ./$(DEPDIR)/helgrind_x86_linux-hg_errors.Po +include ./$(DEPDIR)/helgrind_x86_linux-hg_lock_n_thread.Po +include ./$(DEPDIR)/helgrind_x86_linux-hg_main.Po +include ./$(DEPDIR)/helgrind_x86_linux-hg_wordset.Po +include ./$(DEPDIR)/helgrind_x86_linux-libhb_core.Po +include ./$(DEPDIR)/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Po +include ./$(DEPDIR)/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Po +include ./$(DEPDIR)/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Po +include ./$(DEPDIR)/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Po +include ./$(DEPDIR)/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Po +include ./$(DEPDIR)/vgpreload_helgrind_x86_linux_so-hg_intercepts.Po + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +helgrind_amd64_linux-hg_basics.o: hg_basics.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_basics.o -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_basics.Tpo -c -o helgrind_amd64_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + mv -f $(DEPDIR)/helgrind_amd64_linux-hg_basics.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_basics.Po +# source='hg_basics.c' object='helgrind_amd64_linux-hg_basics.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + +helgrind_amd64_linux-hg_basics.obj: hg_basics.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_basics.obj -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_basics.Tpo -c -o helgrind_amd64_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + mv -f $(DEPDIR)/helgrind_amd64_linux-hg_basics.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_basics.Po +# source='hg_basics.c' object='helgrind_amd64_linux-hg_basics.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + +helgrind_amd64_linux-hg_lock_n_thread.o: hg_lock_n_thread.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_lock_n_thread.o -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_lock_n_thread.Tpo -c -o helgrind_amd64_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + mv -f $(DEPDIR)/helgrind_amd64_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_lock_n_thread.Po +# source='hg_lock_n_thread.c' object='helgrind_amd64_linux-hg_lock_n_thread.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + +helgrind_amd64_linux-hg_lock_n_thread.obj: hg_lock_n_thread.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_lock_n_thread.obj -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_lock_n_thread.Tpo -c -o helgrind_amd64_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + mv -f $(DEPDIR)/helgrind_amd64_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_lock_n_thread.Po +# source='hg_lock_n_thread.c' object='helgrind_amd64_linux-hg_lock_n_thread.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + +helgrind_amd64_linux-hg_wordset.o: hg_wordset.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_wordset.o -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_wordset.Tpo -c -o helgrind_amd64_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + mv -f $(DEPDIR)/helgrind_amd64_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_wordset.Po +# source='hg_wordset.c' object='helgrind_amd64_linux-hg_wordset.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + +helgrind_amd64_linux-hg_wordset.obj: hg_wordset.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_wordset.obj -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_wordset.Tpo -c -o helgrind_amd64_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + mv -f $(DEPDIR)/helgrind_amd64_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_wordset.Po +# source='hg_wordset.c' object='helgrind_amd64_linux-hg_wordset.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + +helgrind_amd64_linux-libhb_core.o: libhb_core.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-libhb_core.o -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-libhb_core.Tpo -c -o helgrind_amd64_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + mv -f $(DEPDIR)/helgrind_amd64_linux-libhb_core.Tpo $(DEPDIR)/helgrind_amd64_linux-libhb_core.Po +# source='libhb_core.c' object='helgrind_amd64_linux-libhb_core.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + +helgrind_amd64_linux-libhb_core.obj: libhb_core.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-libhb_core.obj -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-libhb_core.Tpo -c -o helgrind_amd64_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + mv -f $(DEPDIR)/helgrind_amd64_linux-libhb_core.Tpo $(DEPDIR)/helgrind_amd64_linux-libhb_core.Po +# source='libhb_core.c' object='helgrind_amd64_linux-libhb_core.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + +helgrind_amd64_linux-hg_errors.o: hg_errors.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_errors.o -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_errors.Tpo -c -o helgrind_amd64_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + mv -f $(DEPDIR)/helgrind_amd64_linux-hg_errors.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_errors.Po +# source='hg_errors.c' object='helgrind_amd64_linux-hg_errors.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + +helgrind_amd64_linux-hg_errors.obj: hg_errors.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_errors.obj -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_errors.Tpo -c -o helgrind_amd64_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + mv -f $(DEPDIR)/helgrind_amd64_linux-hg_errors.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_errors.Po +# source='hg_errors.c' object='helgrind_amd64_linux-hg_errors.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + +helgrind_amd64_linux-hg_main.o: hg_main.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_main.o -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_main.Tpo -c -o helgrind_amd64_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + mv -f $(DEPDIR)/helgrind_amd64_linux-hg_main.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_main.Po +# source='hg_main.c' object='helgrind_amd64_linux-hg_main.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + +helgrind_amd64_linux-hg_main.obj: hg_main.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_main.obj -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_main.Tpo -c -o helgrind_amd64_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + mv -f $(DEPDIR)/helgrind_amd64_linux-hg_main.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_main.Po +# source='hg_main.c' object='helgrind_amd64_linux-hg_main.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + +helgrind_ppc32_aix5-hg_basics.o: hg_basics.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_basics.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_basics.Tpo -c -o helgrind_ppc32_aix5-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_basics.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_basics.Po +# source='hg_basics.c' object='helgrind_ppc32_aix5-hg_basics.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + +helgrind_ppc32_aix5-hg_basics.obj: hg_basics.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_basics.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_basics.Tpo -c -o helgrind_ppc32_aix5-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_basics.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_basics.Po +# source='hg_basics.c' object='helgrind_ppc32_aix5-hg_basics.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + +helgrind_ppc32_aix5-hg_lock_n_thread.o: hg_lock_n_thread.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_lock_n_thread.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_lock_n_thread.Tpo -c -o helgrind_ppc32_aix5-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_lock_n_thread.Po +# source='hg_lock_n_thread.c' object='helgrind_ppc32_aix5-hg_lock_n_thread.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + +helgrind_ppc32_aix5-hg_lock_n_thread.obj: hg_lock_n_thread.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_lock_n_thread.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_lock_n_thread.Tpo -c -o helgrind_ppc32_aix5-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_lock_n_thread.Po +# source='hg_lock_n_thread.c' object='helgrind_ppc32_aix5-hg_lock_n_thread.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + +helgrind_ppc32_aix5-hg_wordset.o: hg_wordset.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_wordset.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_wordset.Tpo -c -o helgrind_ppc32_aix5-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_wordset.Po +# source='hg_wordset.c' object='helgrind_ppc32_aix5-hg_wordset.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + +helgrind_ppc32_aix5-hg_wordset.obj: hg_wordset.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_wordset.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_wordset.Tpo -c -o helgrind_ppc32_aix5-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_wordset.Po +# source='hg_wordset.c' object='helgrind_ppc32_aix5-hg_wordset.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + +helgrind_ppc32_aix5-libhb_core.o: libhb_core.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-libhb_core.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-libhb_core.Tpo -c -o helgrind_ppc32_aix5-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + mv -f $(DEPDIR)/helgrind_ppc32_aix5-libhb_core.Tpo $(DEPDIR)/helgrind_ppc32_aix5-libhb_core.Po +# source='libhb_core.c' object='helgrind_ppc32_aix5-libhb_core.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + +helgrind_ppc32_aix5-libhb_core.obj: libhb_core.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-libhb_core.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-libhb_core.Tpo -c -o helgrind_ppc32_aix5-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc32_aix5-libhb_core.Tpo $(DEPDIR)/helgrind_ppc32_aix5-libhb_core.Po +# source='libhb_core.c' object='helgrind_ppc32_aix5-libhb_core.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + +helgrind_ppc32_aix5-hg_errors.o: hg_errors.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_errors.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_errors.Tpo -c -o helgrind_ppc32_aix5-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_errors.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_errors.Po +# source='hg_errors.c' object='helgrind_ppc32_aix5-hg_errors.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + +helgrind_ppc32_aix5-hg_errors.obj: hg_errors.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_errors.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_errors.Tpo -c -o helgrind_ppc32_aix5-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_errors.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_errors.Po +# source='hg_errors.c' object='helgrind_ppc32_aix5-hg_errors.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + +helgrind_ppc32_aix5-hg_main.o: hg_main.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_main.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_main.Tpo -c -o helgrind_ppc32_aix5-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_main.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_main.Po +# source='hg_main.c' object='helgrind_ppc32_aix5-hg_main.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + +helgrind_ppc32_aix5-hg_main.obj: hg_main.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_main.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_main.Tpo -c -o helgrind_ppc32_aix5-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_main.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_main.Po +# source='hg_main.c' object='helgrind_ppc32_aix5-hg_main.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + +helgrind_ppc32_linux-hg_basics.o: hg_basics.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_basics.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_basics.Tpo -c -o helgrind_ppc32_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_basics.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_basics.Po +# source='hg_basics.c' object='helgrind_ppc32_linux-hg_basics.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + +helgrind_ppc32_linux-hg_basics.obj: hg_basics.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_basics.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_basics.Tpo -c -o helgrind_ppc32_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_basics.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_basics.Po +# source='hg_basics.c' object='helgrind_ppc32_linux-hg_basics.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + +helgrind_ppc32_linux-hg_lock_n_thread.o: hg_lock_n_thread.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_lock_n_thread.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_lock_n_thread.Tpo -c -o helgrind_ppc32_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_lock_n_thread.Po +# source='hg_lock_n_thread.c' object='helgrind_ppc32_linux-hg_lock_n_thread.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + +helgrind_ppc32_linux-hg_lock_n_thread.obj: hg_lock_n_thread.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_lock_n_thread.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_lock_n_thread.Tpo -c -o helgrind_ppc32_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_lock_n_thread.Po +# source='hg_lock_n_thread.c' object='helgrind_ppc32_linux-hg_lock_n_thread.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + +helgrind_ppc32_linux-hg_wordset.o: hg_wordset.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_wordset.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_wordset.Tpo -c -o helgrind_ppc32_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_wordset.Po +# source='hg_wordset.c' object='helgrind_ppc32_linux-hg_wordset.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + +helgrind_ppc32_linux-hg_wordset.obj: hg_wordset.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_wordset.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_wordset.Tpo -c -o helgrind_ppc32_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_wordset.Po +# source='hg_wordset.c' object='helgrind_ppc32_linux-hg_wordset.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + +helgrind_ppc32_linux-libhb_core.o: libhb_core.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-libhb_core.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-libhb_core.Tpo -c -o helgrind_ppc32_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + mv -f $(DEPDIR)/helgrind_ppc32_linux-libhb_core.Tpo $(DEPDIR)/helgrind_ppc32_linux-libhb_core.Po +# source='libhb_core.c' object='helgrind_ppc32_linux-libhb_core.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + +helgrind_ppc32_linux-libhb_core.obj: libhb_core.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-libhb_core.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-libhb_core.Tpo -c -o helgrind_ppc32_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc32_linux-libhb_core.Tpo $(DEPDIR)/helgrind_ppc32_linux-libhb_core.Po +# source='libhb_core.c' object='helgrind_ppc32_linux-libhb_core.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + +helgrind_ppc32_linux-hg_errors.o: hg_errors.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_errors.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_errors.Tpo -c -o helgrind_ppc32_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_errors.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_errors.Po +# source='hg_errors.c' object='helgrind_ppc32_linux-hg_errors.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + +helgrind_ppc32_linux-hg_errors.obj: hg_errors.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_errors.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_errors.Tpo -c -o helgrind_ppc32_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_errors.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_errors.Po +# source='hg_errors.c' object='helgrind_ppc32_linux-hg_errors.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + +helgrind_ppc32_linux-hg_main.o: hg_main.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_main.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_main.Tpo -c -o helgrind_ppc32_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_main.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_main.Po +# source='hg_main.c' object='helgrind_ppc32_linux-hg_main.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + +helgrind_ppc32_linux-hg_main.obj: hg_main.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_main.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_main.Tpo -c -o helgrind_ppc32_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_main.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_main.Po +# source='hg_main.c' object='helgrind_ppc32_linux-hg_main.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + +helgrind_ppc64_aix5-hg_basics.o: hg_basics.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_basics.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_basics.Tpo -c -o helgrind_ppc64_aix5-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_basics.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_basics.Po +# source='hg_basics.c' object='helgrind_ppc64_aix5-hg_basics.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + +helgrind_ppc64_aix5-hg_basics.obj: hg_basics.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_basics.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_basics.Tpo -c -o helgrind_ppc64_aix5-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_basics.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_basics.Po +# source='hg_basics.c' object='helgrind_ppc64_aix5-hg_basics.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + +helgrind_ppc64_aix5-hg_lock_n_thread.o: hg_lock_n_thread.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_lock_n_thread.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_lock_n_thread.Tpo -c -o helgrind_ppc64_aix5-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_lock_n_thread.Po +# source='hg_lock_n_thread.c' object='helgrind_ppc64_aix5-hg_lock_n_thread.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + +helgrind_ppc64_aix5-hg_lock_n_thread.obj: hg_lock_n_thread.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_lock_n_thread.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_lock_n_thread.Tpo -c -o helgrind_ppc64_aix5-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_lock_n_thread.Po +# source='hg_lock_n_thread.c' object='helgrind_ppc64_aix5-hg_lock_n_thread.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + +helgrind_ppc64_aix5-hg_wordset.o: hg_wordset.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_wordset.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_wordset.Tpo -c -o helgrind_ppc64_aix5-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_wordset.Po +# source='hg_wordset.c' object='helgrind_ppc64_aix5-hg_wordset.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + +helgrind_ppc64_aix5-hg_wordset.obj: hg_wordset.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_wordset.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_wordset.Tpo -c -o helgrind_ppc64_aix5-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_wordset.Po +# source='hg_wordset.c' object='helgrind_ppc64_aix5-hg_wordset.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + +helgrind_ppc64_aix5-libhb_core.o: libhb_core.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-libhb_core.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-libhb_core.Tpo -c -o helgrind_ppc64_aix5-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + mv -f $(DEPDIR)/helgrind_ppc64_aix5-libhb_core.Tpo $(DEPDIR)/helgrind_ppc64_aix5-libhb_core.Po +# source='libhb_core.c' object='helgrind_ppc64_aix5-libhb_core.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + +helgrind_ppc64_aix5-libhb_core.obj: libhb_core.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-libhb_core.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-libhb_core.Tpo -c -o helgrind_ppc64_aix5-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc64_aix5-libhb_core.Tpo $(DEPDIR)/helgrind_ppc64_aix5-libhb_core.Po +# source='libhb_core.c' object='helgrind_ppc64_aix5-libhb_core.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + +helgrind_ppc64_aix5-hg_errors.o: hg_errors.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_errors.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_errors.Tpo -c -o helgrind_ppc64_aix5-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_errors.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_errors.Po +# source='hg_errors.c' object='helgrind_ppc64_aix5-hg_errors.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + +helgrind_ppc64_aix5-hg_errors.obj: hg_errors.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_errors.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_errors.Tpo -c -o helgrind_ppc64_aix5-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_errors.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_errors.Po +# source='hg_errors.c' object='helgrind_ppc64_aix5-hg_errors.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + +helgrind_ppc64_aix5-hg_main.o: hg_main.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_main.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_main.Tpo -c -o helgrind_ppc64_aix5-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_main.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_main.Po +# source='hg_main.c' object='helgrind_ppc64_aix5-hg_main.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + +helgrind_ppc64_aix5-hg_main.obj: hg_main.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_main.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_main.Tpo -c -o helgrind_ppc64_aix5-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_main.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_main.Po +# source='hg_main.c' object='helgrind_ppc64_aix5-hg_main.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + +helgrind_ppc64_linux-hg_basics.o: hg_basics.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_basics.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_basics.Tpo -c -o helgrind_ppc64_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_basics.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_basics.Po +# source='hg_basics.c' object='helgrind_ppc64_linux-hg_basics.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + +helgrind_ppc64_linux-hg_basics.obj: hg_basics.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_basics.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_basics.Tpo -c -o helgrind_ppc64_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_basics.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_basics.Po +# source='hg_basics.c' object='helgrind_ppc64_linux-hg_basics.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + +helgrind_ppc64_linux-hg_lock_n_thread.o: hg_lock_n_thread.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_lock_n_thread.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_lock_n_thread.Tpo -c -o helgrind_ppc64_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_lock_n_thread.Po +# source='hg_lock_n_thread.c' object='helgrind_ppc64_linux-hg_lock_n_thread.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + +helgrind_ppc64_linux-hg_lock_n_thread.obj: hg_lock_n_thread.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_lock_n_thread.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_lock_n_thread.Tpo -c -o helgrind_ppc64_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_lock_n_thread.Po +# source='hg_lock_n_thread.c' object='helgrind_ppc64_linux-hg_lock_n_thread.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + +helgrind_ppc64_linux-hg_wordset.o: hg_wordset.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_wordset.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_wordset.Tpo -c -o helgrind_ppc64_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_wordset.Po +# source='hg_wordset.c' object='helgrind_ppc64_linux-hg_wordset.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + +helgrind_ppc64_linux-hg_wordset.obj: hg_wordset.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_wordset.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_wordset.Tpo -c -o helgrind_ppc64_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_wordset.Po +# source='hg_wordset.c' object='helgrind_ppc64_linux-hg_wordset.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + +helgrind_ppc64_linux-libhb_core.o: libhb_core.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-libhb_core.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-libhb_core.Tpo -c -o helgrind_ppc64_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + mv -f $(DEPDIR)/helgrind_ppc64_linux-libhb_core.Tpo $(DEPDIR)/helgrind_ppc64_linux-libhb_core.Po +# source='libhb_core.c' object='helgrind_ppc64_linux-libhb_core.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + +helgrind_ppc64_linux-libhb_core.obj: libhb_core.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-libhb_core.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-libhb_core.Tpo -c -o helgrind_ppc64_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc64_linux-libhb_core.Tpo $(DEPDIR)/helgrind_ppc64_linux-libhb_core.Po +# source='libhb_core.c' object='helgrind_ppc64_linux-libhb_core.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + +helgrind_ppc64_linux-hg_errors.o: hg_errors.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_errors.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_errors.Tpo -c -o helgrind_ppc64_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_errors.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_errors.Po +# source='hg_errors.c' object='helgrind_ppc64_linux-hg_errors.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + +helgrind_ppc64_linux-hg_errors.obj: hg_errors.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_errors.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_errors.Tpo -c -o helgrind_ppc64_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_errors.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_errors.Po +# source='hg_errors.c' object='helgrind_ppc64_linux-hg_errors.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + +helgrind_ppc64_linux-hg_main.o: hg_main.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_main.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_main.Tpo -c -o helgrind_ppc64_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_main.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_main.Po +# source='hg_main.c' object='helgrind_ppc64_linux-hg_main.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + +helgrind_ppc64_linux-hg_main.obj: hg_main.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_main.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_main.Tpo -c -o helgrind_ppc64_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_main.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_main.Po +# source='hg_main.c' object='helgrind_ppc64_linux-hg_main.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + +helgrind_x86_linux-hg_basics.o: hg_basics.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_basics.o -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_basics.Tpo -c -o helgrind_x86_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + mv -f $(DEPDIR)/helgrind_x86_linux-hg_basics.Tpo $(DEPDIR)/helgrind_x86_linux-hg_basics.Po +# source='hg_basics.c' object='helgrind_x86_linux-hg_basics.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + +helgrind_x86_linux-hg_basics.obj: hg_basics.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_basics.obj -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_basics.Tpo -c -o helgrind_x86_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + mv -f $(DEPDIR)/helgrind_x86_linux-hg_basics.Tpo $(DEPDIR)/helgrind_x86_linux-hg_basics.Po +# source='hg_basics.c' object='helgrind_x86_linux-hg_basics.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + +helgrind_x86_linux-hg_lock_n_thread.o: hg_lock_n_thread.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_lock_n_thread.o -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_lock_n_thread.Tpo -c -o helgrind_x86_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + mv -f $(DEPDIR)/helgrind_x86_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_x86_linux-hg_lock_n_thread.Po +# source='hg_lock_n_thread.c' object='helgrind_x86_linux-hg_lock_n_thread.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + +helgrind_x86_linux-hg_lock_n_thread.obj: hg_lock_n_thread.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_lock_n_thread.obj -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_lock_n_thread.Tpo -c -o helgrind_x86_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + mv -f $(DEPDIR)/helgrind_x86_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_x86_linux-hg_lock_n_thread.Po +# source='hg_lock_n_thread.c' object='helgrind_x86_linux-hg_lock_n_thread.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + +helgrind_x86_linux-hg_wordset.o: hg_wordset.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_wordset.o -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_wordset.Tpo -c -o helgrind_x86_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + mv -f $(DEPDIR)/helgrind_x86_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_x86_linux-hg_wordset.Po +# source='hg_wordset.c' object='helgrind_x86_linux-hg_wordset.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + +helgrind_x86_linux-hg_wordset.obj: hg_wordset.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_wordset.obj -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_wordset.Tpo -c -o helgrind_x86_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + mv -f $(DEPDIR)/helgrind_x86_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_x86_linux-hg_wordset.Po +# source='hg_wordset.c' object='helgrind_x86_linux-hg_wordset.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + +helgrind_x86_linux-libhb_core.o: libhb_core.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-libhb_core.o -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-libhb_core.Tpo -c -o helgrind_x86_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + mv -f $(DEPDIR)/helgrind_x86_linux-libhb_core.Tpo $(DEPDIR)/helgrind_x86_linux-libhb_core.Po +# source='libhb_core.c' object='helgrind_x86_linux-libhb_core.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + +helgrind_x86_linux-libhb_core.obj: libhb_core.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-libhb_core.obj -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-libhb_core.Tpo -c -o helgrind_x86_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + mv -f $(DEPDIR)/helgrind_x86_linux-libhb_core.Tpo $(DEPDIR)/helgrind_x86_linux-libhb_core.Po +# source='libhb_core.c' object='helgrind_x86_linux-libhb_core.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + +helgrind_x86_linux-hg_errors.o: hg_errors.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_errors.o -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_errors.Tpo -c -o helgrind_x86_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + mv -f $(DEPDIR)/helgrind_x86_linux-hg_errors.Tpo $(DEPDIR)/helgrind_x86_linux-hg_errors.Po +# source='hg_errors.c' object='helgrind_x86_linux-hg_errors.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + +helgrind_x86_linux-hg_errors.obj: hg_errors.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_errors.obj -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_errors.Tpo -c -o helgrind_x86_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + mv -f $(DEPDIR)/helgrind_x86_linux-hg_errors.Tpo $(DEPDIR)/helgrind_x86_linux-hg_errors.Po +# source='hg_errors.c' object='helgrind_x86_linux-hg_errors.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + +helgrind_x86_linux-hg_main.o: hg_main.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_main.o -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_main.Tpo -c -o helgrind_x86_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + mv -f $(DEPDIR)/helgrind_x86_linux-hg_main.Tpo $(DEPDIR)/helgrind_x86_linux-hg_main.Po +# source='hg_main.c' object='helgrind_x86_linux-hg_main.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + +helgrind_x86_linux-hg_main.obj: hg_main.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_main.obj -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_main.Tpo -c -o helgrind_x86_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + mv -f $(DEPDIR)/helgrind_x86_linux-hg_main.Tpo $(DEPDIR)/helgrind_x86_linux-hg_main.Po +# source='hg_main.c' object='helgrind_x86_linux-hg_main.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + +vgpreload_helgrind_amd64_linux_so-hg_intercepts.o: hg_intercepts.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_amd64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_amd64_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_amd64_linux_so-hg_intercepts.o -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_amd64_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + mv -f $(DEPDIR)/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Po +# source='hg_intercepts.c' object='vgpreload_helgrind_amd64_linux_so-hg_intercepts.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_amd64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_amd64_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_amd64_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + +vgpreload_helgrind_amd64_linux_so-hg_intercepts.obj: hg_intercepts.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_amd64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_amd64_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_amd64_linux_so-hg_intercepts.obj -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_amd64_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + mv -f $(DEPDIR)/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Po +# source='hg_intercepts.c' object='vgpreload_helgrind_amd64_linux_so-hg_intercepts.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_amd64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_amd64_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_amd64_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + +vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.o: hg_intercepts.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_aix5_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.o -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + mv -f $(DEPDIR)/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Po +# source='hg_intercepts.c' object='vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_aix5_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + +vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.obj: hg_intercepts.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_aix5_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.obj -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + mv -f $(DEPDIR)/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Po +# source='hg_intercepts.c' object='vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_aix5_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + +vgpreload_helgrind_ppc32_linux_so-hg_intercepts.o: hg_intercepts.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc32_linux_so-hg_intercepts.o -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc32_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + mv -f $(DEPDIR)/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Po +# source='hg_intercepts.c' object='vgpreload_helgrind_ppc32_linux_so-hg_intercepts.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc32_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + +vgpreload_helgrind_ppc32_linux_so-hg_intercepts.obj: hg_intercepts.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc32_linux_so-hg_intercepts.obj -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc32_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + mv -f $(DEPDIR)/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Po +# source='hg_intercepts.c' object='vgpreload_helgrind_ppc32_linux_so-hg_intercepts.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc32_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + +vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.o: hg_intercepts.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_aix5_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.o -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + mv -f $(DEPDIR)/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Po +# source='hg_intercepts.c' object='vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_aix5_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + +vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.obj: hg_intercepts.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_aix5_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.obj -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + mv -f $(DEPDIR)/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Po +# source='hg_intercepts.c' object='vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_aix5_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + +vgpreload_helgrind_ppc64_linux_so-hg_intercepts.o: hg_intercepts.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc64_linux_so-hg_intercepts.o -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc64_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + mv -f $(DEPDIR)/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Po +# source='hg_intercepts.c' object='vgpreload_helgrind_ppc64_linux_so-hg_intercepts.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc64_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + +vgpreload_helgrind_ppc64_linux_so-hg_intercepts.obj: hg_intercepts.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc64_linux_so-hg_intercepts.obj -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc64_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + mv -f $(DEPDIR)/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Po +# source='hg_intercepts.c' object='vgpreload_helgrind_ppc64_linux_so-hg_intercepts.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc64_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + +vgpreload_helgrind_x86_linux_so-hg_intercepts.o: hg_intercepts.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_x86_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_x86_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_x86_linux_so-hg_intercepts.o -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_x86_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_x86_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + mv -f $(DEPDIR)/vgpreload_helgrind_x86_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_x86_linux_so-hg_intercepts.Po +# source='hg_intercepts.c' object='vgpreload_helgrind_x86_linux_so-hg_intercepts.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_x86_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_x86_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_x86_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + +vgpreload_helgrind_x86_linux_so-hg_intercepts.obj: hg_intercepts.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_x86_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_x86_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_x86_linux_so-hg_intercepts.obj -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_x86_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_x86_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + mv -f $(DEPDIR)/vgpreload_helgrind_x86_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_x86_linux_so-hg_intercepts.Po +# source='hg_intercepts.c' object='vgpreload_helgrind_x86_linux_so-hg_intercepts.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_x86_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_x86_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_x86_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` +install-hgincludeHEADERS: $(hginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(hgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(hgincludedir)" + @list='$(hginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(hgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(hgincludedir)/$$f'"; \ + $(hgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(hgincludedir)/$$f"; \ + done + +uninstall-hgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(hginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(hgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(hgincludedir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(PROGRAMS) $(HEADERS) all-local +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(hgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-hgincludeHEADERS + +install-dvi: install-dvi-recursive + +install-exec-am: install-exec-local + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-hgincludeHEADERS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am all-local check check-am clean clean-generic \ + clean-noinstPROGRAMS ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-exec-local \ + install-hgincludeHEADERS install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-hgincludeHEADERS + + +# The kludge that passes for vex's build system can't handle parallel +# builds. So, for the time being, serialise all Valgrind building. +# (this is equivalent to enforcing "make -j 1". +.NOTPARALLEL: + +# This is used by coregrind/Makefile.am and Makefile.tool.am for doing +# "in-place" installs. It copies $(noinst_PROGRAMS) into $inplacedir. +# It needs to be depended on by an 'all-local' rule. +inplace-noinst_PROGRAMS: + if [ -n "$(noinst_PROGRAMS)" ] ; then \ + mkdir -p $(inplacedir); \ + for f in $(noinst_PROGRAMS) ; do \ + rm -f $(inplacedir)/$$f; \ + ln -f -s ../$(subdir)/$$f $(inplacedir); \ + done ; \ + fi + +# This is used by coregrind/Makefile.am and by <tool>/Makefile.am for doing +# "make install". It copies $(noinst_PROGRAMS) into $prefix/lib/valgrind/. +# It needs to be depended on by an 'install-exec-local' rule. +install-noinst_PROGRAMS: + if [ -n "$(noinst_PROGRAMS)" ] ; then \ + $(mkinstalldirs) $(DESTDIR)$(valdir); \ + for f in $(noinst_PROGRAMS); do \ + $(INSTALL_PROGRAM) $$f $(DESTDIR)$(valdir); \ + done ; \ + fi + +$(top_srcdir)/VEX/libvex-x86-linux.a: $(top_srcdir)/VEX/priv/main/vex_svnversion.h + $(MAKE) -C $(top_srcdir)/VEX CC="$(CC)" AR="$(AR)" \ + libvex-x86-linux.a \ + EXTRA_CFLAGS="$(AM_CFLAGS_X86_LINUX) -Wdeclaration-after-statement \ + -fno-stack-protector" + +$(top_srcdir)/VEX/libvex-amd64-linux.a: $(top_srcdir)/VEX/priv/main/vex_svnversion.h + $(MAKE) -C $(top_srcdir)/VEX CC="$(CC)" AR="$(AR)" \ + libvex-amd64-linux.a \ + EXTRA_CFLAGS="$(AM_CFLAGS_AMD64_LINUX) -Wdeclaration-after-statement \ + -fno-stack-protector" + +$(top_srcdir)/VEX/libvex-ppc32-linux.a: $(top_srcdir)/VEX/priv/main/vex_svnversion.h + $(MAKE) -C $(top_srcdir)/VEX CC="$(CC)" AR="$(AR)" \ + libvex-ppc32-linux.a \ + EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_LINUX) -Wdeclaration-after-statement \ + -fno-stack-protector" + +$(top_srcdir)/VEX/libvex-ppc64-linux.a: $(top_srcdir)/VEX/priv/main/vex_svnversion.h + $(MAKE) -C $(top_srcdir)/VEX CC="$(CC)" AR="$(AR)" \ + libvex-ppc64-linux.a \ + EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_LINUX) -Wdeclaration-after-statement \ + -fno-stack-protector" + +$(top_srcdir)/VEX/libvex-ppc32-aix5.a: $(top_srcdir)/VEX/priv/main/vex_svnversion.h + $(MAKE) -C $(top_srcdir)/VEX CC="$(CC)" AR="$(AR) -X32" \ + libvex-ppc32-aix5.a \ + EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_AIX5) -Wdeclaration-after-statement \ + -fno-stack-protector" + +$(top_srcdir)/VEX/libvex-ppc64-aix5.a: $(top_srcdir)/VEX/priv/main/vex_svnversion.h + $(MAKE) -C $(top_srcdir)/VEX CC="$(CC)" AR="$(AR) -X64" \ + libvex-ppc64-aix5.a \ + EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_AIX5) -Wdeclaration-after-statement \ + -fno-stack-protector" + +$(top_srcdir)/VEX/priv/main/vex_svnversion.h: + $(MAKE) -C $(top_srcdir)/VEX CC="$(CC)" version + +all-local: inplace-noinst_PROGRAMS + +install-exec-local: install-noinst_PROGRAMS +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/helgrind/Makefile.am b/helgrind/Makefile.am new file mode 100644 index 0000000..02f96ba --- /dev/null +++ b/helgrind/Makefile.am @@ -0,0 +1,127 @@ +include $(top_srcdir)/Makefile.tool.am + +noinst_PROGRAMS = +if VGCONF_PLATFORMS_INCLUDE_X86_LINUX +noinst_PROGRAMS += helgrind-x86-linux vgpreload_helgrind-x86-linux.so +endif +if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX +noinst_PROGRAMS += helgrind-amd64-linux vgpreload_helgrind-amd64-linux.so +endif +if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX +noinst_PROGRAMS += helgrind-ppc32-linux vgpreload_helgrind-ppc32-linux.so +endif +if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX +noinst_PROGRAMS += helgrind-ppc64-linux vgpreload_helgrind-ppc64-linux.so +endif +if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5 +noinst_PROGRAMS += helgrind-ppc32-aix5 vgpreload_helgrind-ppc32-aix5.so +endif +if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5 +noinst_PROGRAMS += helgrind-ppc64-aix5 vgpreload_helgrind-ppc64-aix5.so +endif + +VGPRELOAD_HELGRIND_SOURCES_COMMON = hg_intercepts.c + +vgpreload_helgrind_x86_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_x86_linux_so_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX) +vgpreload_helgrind_x86_linux_so_CFLAGS = $(AM_CFLAGS_X86_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_x86_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_X86_LINUX) +vgpreload_helgrind_x86_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_X86_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_X86_LINUX) + +vgpreload_helgrind_amd64_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_amd64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX) +vgpreload_helgrind_amd64_linux_so_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_amd64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_AMD64_LINUX) +vgpreload_helgrind_amd64_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_AMD64_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX) + +vgpreload_helgrind_ppc32_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc32_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX) +vgpreload_helgrind_ppc32_linux_so_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc32_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_LINUX) +vgpreload_helgrind_ppc32_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC32_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX) + +vgpreload_helgrind_ppc64_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX) +vgpreload_helgrind_ppc64_linux_so_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_LINUX) +vgpreload_helgrind_ppc64_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC64_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX) + +vgpreload_helgrind_ppc32_aix5_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc32_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5) +vgpreload_helgrind_ppc32_aix5_so_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc32_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_AIX5) +vgpreload_helgrind_ppc32_aix5_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC32_AIX5) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC32_AIX5) + +vgpreload_helgrind_ppc64_aix5_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc64_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5) +vgpreload_helgrind_ppc64_aix5_so_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc64_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_AIX5) +vgpreload_helgrind_ppc64_aix5_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC64_AIX5) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC64_AIX5) + +HELGRIND_SOURCES_COMMON = \ + hg_basics.c hg_lock_n_thread.c hg_wordset.c libhb_core.c \ + hg_errors.c hg_main.c + +helgrind_x86_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_x86_linux_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX) +helgrind_x86_linux_CFLAGS = $(AM_CFLAGS_X86_LINUX) -O2 +helgrind_x86_linux_DEPENDENCIES = $(COREGRIND_LIBS_X86_LINUX) +helgrind_x86_linux_LDADD = $(TOOL_LDADD_X86_LINUX) +helgrind_x86_linux_LDFLAGS = $(TOOL_LDFLAGS_X86_LINUX) + +helgrind_amd64_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_amd64_linux_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX) +helgrind_amd64_linux_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) -O2 +helgrind_amd64_linux_DEPENDENCIES = $(COREGRIND_LIBS_AMD64_LINUX) +helgrind_amd64_linux_LDADD = $(TOOL_LDADD_AMD64_LINUX) +helgrind_amd64_linux_LDFLAGS = $(TOOL_LDFLAGS_AMD64_LINUX) + +helgrind_ppc32_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc32_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX) +helgrind_ppc32_linux_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) -O2 +helgrind_ppc32_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_LINUX) +helgrind_ppc32_linux_LDADD = $(TOOL_LDADD_PPC32_LINUX) +helgrind_ppc32_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC32_LINUX) + +helgrind_ppc64_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc64_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX) +helgrind_ppc64_linux_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) -O2 +helgrind_ppc64_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_LINUX) +helgrind_ppc64_linux_LDADD = $(TOOL_LDADD_PPC64_LINUX) +helgrind_ppc64_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC64_LINUX) + +helgrind_ppc32_aix5_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc32_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5) +helgrind_ppc32_aix5_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) -O2 +helgrind_ppc32_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_AIX5) +helgrind_ppc32_aix5_LDADD = $(TOOL_LDADD_PPC32_AIX5) +helgrind_ppc32_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC32_AIX5) + +helgrind_ppc64_aix5_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc64_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5) +helgrind_ppc64_aix5_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) -O2 +helgrind_ppc64_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_AIX5) +helgrind_ppc64_aix5_LDADD = $(TOOL_LDADD_PPC64_AIX5) +helgrind_ppc64_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC64_AIX5) + +hgincludedir = $(includedir)/valgrind + +hginclude_HEADERS = helgrind.h + +noinst_HEADERS = \ + hg_basics.h hg_lock_n_thread.h hg_errors.h hg_wordset.h \ + libhb.h + +EXTRA_DIST = README_MSMProp2.txt README_YARD.txt diff --git a/helgrind/Makefile.in b/helgrind/Makefile.in new file mode 100644 index 0000000..697f107 --- /dev/null +++ b/helgrind/Makefile.in @@ -0,0 +1,1787 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# This file contains things shared by coregrind/Makefile.am and tool +# Makefile.am files. + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(hginclude_HEADERS) $(noinst_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/Makefile.all.am \ + $(top_srcdir)/Makefile.core-tool.am \ + $(top_srcdir)/Makefile.flags.am $(top_srcdir)/Makefile.tool.am +noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ + $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) +@VGCONF_PLATFORMS_INCLUDE_X86_LINUX_TRUE@am__append_1 = helgrind-x86-linux vgpreload_helgrind-x86-linux.so +@VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX_TRUE@am__append_2 = helgrind-amd64-linux vgpreload_helgrind-amd64-linux.so +@VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX_TRUE@am__append_3 = helgrind-ppc32-linux vgpreload_helgrind-ppc32-linux.so +@VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX_TRUE@am__append_4 = helgrind-ppc64-linux vgpreload_helgrind-ppc64-linux.so +@VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5_TRUE@am__append_5 = helgrind-ppc32-aix5 vgpreload_helgrind-ppc32-aix5.so +@VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5_TRUE@am__append_6 = helgrind-ppc64-aix5 vgpreload_helgrind-ppc64-aix5.so +subdir = helgrind +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +@VGCONF_PLATFORMS_INCLUDE_X86_LINUX_TRUE@am__EXEEXT_1 = helgrind-x86-linux$(EXEEXT) \ +@VGCONF_PLATFORMS_INCLUDE_X86_LINUX_TRUE@ vgpreload_helgrind-x86-linux.so$(EXEEXT) +@VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX_TRUE@am__EXEEXT_2 = helgrind-amd64-linux$(EXEEXT) \ +@VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX_TRUE@ vgpreload_helgrind-amd64-linux.so$(EXEEXT) +@VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX_TRUE@am__EXEEXT_3 = helgrind-ppc32-linux$(EXEEXT) \ +@VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX_TRUE@ vgpreload_helgrind-ppc32-linux.so$(EXEEXT) +@VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX_TRUE@am__EXEEXT_4 = helgrind-ppc64-linux$(EXEEXT) \ +@VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX_TRUE@ vgpreload_helgrind-ppc64-linux.so$(EXEEXT) +@VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5_TRUE@am__EXEEXT_5 = helgrind-ppc32-aix5$(EXEEXT) \ +@VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5_TRUE@ vgpreload_helgrind-ppc32-aix5.so$(EXEEXT) +@VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5_TRUE@am__EXEEXT_6 = helgrind-ppc64-aix5$(EXEEXT) \ +@VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5_TRUE@ vgpreload_helgrind-ppc64-aix5.so$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +am__objects_1 = helgrind_amd64_linux-hg_basics.$(OBJEXT) \ + helgrind_amd64_linux-hg_lock_n_thread.$(OBJEXT) \ + helgrind_amd64_linux-hg_wordset.$(OBJEXT) \ + helgrind_amd64_linux-libhb_core.$(OBJEXT) \ + helgrind_amd64_linux-hg_errors.$(OBJEXT) \ + helgrind_amd64_linux-hg_main.$(OBJEXT) +am_helgrind_amd64_linux_OBJECTS = $(am__objects_1) +helgrind_amd64_linux_OBJECTS = $(am_helgrind_amd64_linux_OBJECTS) +am__DEPENDENCIES_1 = +am__DEPENDENCIES_2 = $(COREGRIND_LIBS_AMD64_LINUX) \ + $(am__DEPENDENCIES_1) +helgrind_amd64_linux_LINK = $(CCLD) $(helgrind_amd64_linux_CFLAGS) \ + $(CFLAGS) $(helgrind_amd64_linux_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_2 = helgrind_ppc32_aix5-hg_basics.$(OBJEXT) \ + helgrind_ppc32_aix5-hg_lock_n_thread.$(OBJEXT) \ + helgrind_ppc32_aix5-hg_wordset.$(OBJEXT) \ + helgrind_ppc32_aix5-libhb_core.$(OBJEXT) \ + helgrind_ppc32_aix5-hg_errors.$(OBJEXT) \ + helgrind_ppc32_aix5-hg_main.$(OBJEXT) +am_helgrind_ppc32_aix5_OBJECTS = $(am__objects_2) +helgrind_ppc32_aix5_OBJECTS = $(am_helgrind_ppc32_aix5_OBJECTS) +am__DEPENDENCIES_3 = $(COREGRIND_LIBS_PPC32_AIX5) \ + $(am__DEPENDENCIES_1) +helgrind_ppc32_aix5_LINK = $(CCLD) $(helgrind_ppc32_aix5_CFLAGS) \ + $(CFLAGS) $(helgrind_ppc32_aix5_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_3 = helgrind_ppc32_linux-hg_basics.$(OBJEXT) \ + helgrind_ppc32_linux-hg_lock_n_thread.$(OBJEXT) \ + helgrind_ppc32_linux-hg_wordset.$(OBJEXT) \ + helgrind_ppc32_linux-libhb_core.$(OBJEXT) \ + helgrind_ppc32_linux-hg_errors.$(OBJEXT) \ + helgrind_ppc32_linux-hg_main.$(OBJEXT) +am_helgrind_ppc32_linux_OBJECTS = $(am__objects_3) +helgrind_ppc32_linux_OBJECTS = $(am_helgrind_ppc32_linux_OBJECTS) +am__DEPENDENCIES_4 = $(COREGRIND_LIBS_PPC32_LINUX) \ + $(am__DEPENDENCIES_1) +helgrind_ppc32_linux_LINK = $(CCLD) $(helgrind_ppc32_linux_CFLAGS) \ + $(CFLAGS) $(helgrind_ppc32_linux_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_4 = helgrind_ppc64_aix5-hg_basics.$(OBJEXT) \ + helgrind_ppc64_aix5-hg_lock_n_thread.$(OBJEXT) \ + helgrind_ppc64_aix5-hg_wordset.$(OBJEXT) \ + helgrind_ppc64_aix5-libhb_core.$(OBJEXT) \ + helgrind_ppc64_aix5-hg_errors.$(OBJEXT) \ + helgrind_ppc64_aix5-hg_main.$(OBJEXT) +am_helgrind_ppc64_aix5_OBJECTS = $(am__objects_4) +helgrind_ppc64_aix5_OBJECTS = $(am_helgrind_ppc64_aix5_OBJECTS) +am__DEPENDENCIES_5 = $(COREGRIND_LIBS_PPC64_AIX5) \ + $(am__DEPENDENCIES_1) +helgrind_ppc64_aix5_LINK = $(CCLD) $(helgrind_ppc64_aix5_CFLAGS) \ + $(CFLAGS) $(helgrind_ppc64_aix5_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_5 = helgrind_ppc64_linux-hg_basics.$(OBJEXT) \ + helgrind_ppc64_linux-hg_lock_n_thread.$(OBJEXT) \ + helgrind_ppc64_linux-hg_wordset.$(OBJEXT) \ + helgrind_ppc64_linux-libhb_core.$(OBJEXT) \ + helgrind_ppc64_linux-hg_errors.$(OBJEXT) \ + helgrind_ppc64_linux-hg_main.$(OBJEXT) +am_helgrind_ppc64_linux_OBJECTS = $(am__objects_5) +helgrind_ppc64_linux_OBJECTS = $(am_helgrind_ppc64_linux_OBJECTS) +am__DEPENDENCIES_6 = $(COREGRIND_LIBS_PPC64_LINUX) \ + $(am__DEPENDENCIES_1) +helgrind_ppc64_linux_LINK = $(CCLD) $(helgrind_ppc64_linux_CFLAGS) \ + $(CFLAGS) $(helgrind_ppc64_linux_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_6 = helgrind_x86_linux-hg_basics.$(OBJEXT) \ + helgrind_x86_linux-hg_lock_n_thread.$(OBJEXT) \ + helgrind_x86_linux-hg_wordset.$(OBJEXT) \ + helgrind_x86_linux-libhb_core.$(OBJEXT) \ + helgrind_x86_linux-hg_errors.$(OBJEXT) \ + helgrind_x86_linux-hg_main.$(OBJEXT) +am_helgrind_x86_linux_OBJECTS = $(am__objects_6) +helgrind_x86_linux_OBJECTS = $(am_helgrind_x86_linux_OBJECTS) +am__DEPENDENCIES_7 = $(COREGRIND_LIBS_X86_LINUX) $(am__DEPENDENCIES_1) +helgrind_x86_linux_LINK = $(CCLD) $(helgrind_x86_linux_CFLAGS) \ + $(CFLAGS) $(helgrind_x86_linux_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_7 = \ + vgpreload_helgrind_amd64_linux_so-hg_intercepts.$(OBJEXT) +am_vgpreload_helgrind_amd64_linux_so_OBJECTS = $(am__objects_7) +vgpreload_helgrind_amd64_linux_so_OBJECTS = \ + $(am_vgpreload_helgrind_amd64_linux_so_OBJECTS) +vgpreload_helgrind_amd64_linux_so_LDADD = $(LDADD) +vgpreload_helgrind_amd64_linux_so_LINK = $(CCLD) \ + $(vgpreload_helgrind_amd64_linux_so_CFLAGS) $(CFLAGS) \ + $(vgpreload_helgrind_amd64_linux_so_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_8 = \ + vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.$(OBJEXT) +am_vgpreload_helgrind_ppc32_aix5_so_OBJECTS = $(am__objects_8) +vgpreload_helgrind_ppc32_aix5_so_OBJECTS = \ + $(am_vgpreload_helgrind_ppc32_aix5_so_OBJECTS) +vgpreload_helgrind_ppc32_aix5_so_LDADD = $(LDADD) +vgpreload_helgrind_ppc32_aix5_so_LINK = $(CCLD) \ + $(vgpreload_helgrind_ppc32_aix5_so_CFLAGS) $(CFLAGS) \ + $(vgpreload_helgrind_ppc32_aix5_so_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_9 = \ + vgpreload_helgrind_ppc32_linux_so-hg_intercepts.$(OBJEXT) +am_vgpreload_helgrind_ppc32_linux_so_OBJECTS = $(am__objects_9) +vgpreload_helgrind_ppc32_linux_so_OBJECTS = \ + $(am_vgpreload_helgrind_ppc32_linux_so_OBJECTS) +vgpreload_helgrind_ppc32_linux_so_LDADD = $(LDADD) +vgpreload_helgrind_ppc32_linux_so_LINK = $(CCLD) \ + $(vgpreload_helgrind_ppc32_linux_so_CFLAGS) $(CFLAGS) \ + $(vgpreload_helgrind_ppc32_linux_so_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_10 = \ + vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.$(OBJEXT) +am_vgpreload_helgrind_ppc64_aix5_so_OBJECTS = $(am__objects_10) +vgpreload_helgrind_ppc64_aix5_so_OBJECTS = \ + $(am_vgpreload_helgrind_ppc64_aix5_so_OBJECTS) +vgpreload_helgrind_ppc64_aix5_so_LDADD = $(LDADD) +vgpreload_helgrind_ppc64_aix5_so_LINK = $(CCLD) \ + $(vgpreload_helgrind_ppc64_aix5_so_CFLAGS) $(CFLAGS) \ + $(vgpreload_helgrind_ppc64_aix5_so_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_11 = \ + vgpreload_helgrind_ppc64_linux_so-hg_intercepts.$(OBJEXT) +am_vgpreload_helgrind_ppc64_linux_so_OBJECTS = $(am__objects_11) +vgpreload_helgrind_ppc64_linux_so_OBJECTS = \ + $(am_vgpreload_helgrind_ppc64_linux_so_OBJECTS) +vgpreload_helgrind_ppc64_linux_so_LDADD = $(LDADD) +vgpreload_helgrind_ppc64_linux_so_LINK = $(CCLD) \ + $(vgpreload_helgrind_ppc64_linux_so_CFLAGS) $(CFLAGS) \ + $(vgpreload_helgrind_ppc64_linux_so_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_12 = \ + vgpreload_helgrind_x86_linux_so-hg_intercepts.$(OBJEXT) +am_vgpreload_helgrind_x86_linux_so_OBJECTS = $(am__objects_12) +vgpreload_helgrind_x86_linux_so_OBJECTS = \ + $(am_vgpreload_helgrind_x86_linux_so_OBJECTS) +vgpreload_helgrind_x86_linux_so_LDADD = $(LDADD) +vgpreload_helgrind_x86_linux_so_LINK = $(CCLD) \ + $(vgpreload_helgrind_x86_linux_so_CFLAGS) $(CFLAGS) \ + $(vgpreload_helgrind_x86_linux_so_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(helgrind_amd64_linux_SOURCES) \ + $(helgrind_ppc32_aix5_SOURCES) $(helgrind_ppc32_linux_SOURCES) \ + $(helgrind_ppc64_aix5_SOURCES) $(helgrind_ppc64_linux_SOURCES) \ + $(helgrind_x86_linux_SOURCES) \ + $(vgpreload_helgrind_amd64_linux_so_SOURCES) \ + $(vgpreload_helgrind_ppc32_aix5_so_SOURCES) \ + $(vgpreload_helgrind_ppc32_linux_so_SOURCES) \ + $(vgpreload_helgrind_ppc64_aix5_so_SOURCES) \ + $(vgpreload_helgrind_ppc64_linux_so_SOURCES) \ + $(vgpreload_helgrind_x86_linux_so_SOURCES) +DIST_SOURCES = $(helgrind_amd64_linux_SOURCES) \ + $(helgrind_ppc32_aix5_SOURCES) $(helgrind_ppc32_linux_SOURCES) \ + $(helgrind_ppc64_aix5_SOURCES) $(helgrind_ppc64_linux_SOURCES) \ + $(helgrind_x86_linux_SOURCES) \ + $(vgpreload_helgrind_amd64_linux_so_SOURCES) \ + $(vgpreload_helgrind_ppc32_aix5_so_SOURCES) \ + $(vgpreload_helgrind_ppc32_linux_so_SOURCES) \ + $(vgpreload_helgrind_ppc64_aix5_so_SOURCES) \ + $(vgpreload_helgrind_ppc64_linux_so_SOURCES) \ + $(vgpreload_helgrind_x86_linux_so_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(hgincludedir)" +hgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(hginclude_HEADERS) $(noinst_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFAULT_SUPP = @DEFAULT_SUPP@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIFF = @DIFF@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FLAG_FNO_STACK_PROTECTOR = @FLAG_FNO_STACK_PROTECTOR@ +FLAG_M32 = @FLAG_M32@ +FLAG_M64 = @FLAG_M64@ +FLAG_MAIX32 = @FLAG_MAIX32@ +FLAG_MAIX64 = @FLAG_MAIX64@ +FLAG_MMMX = @FLAG_MMMX@ +FLAG_MSSE = @FLAG_MSSE@ +FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ +FLAG_WDECL_AFTER_STMT = @FLAG_WDECL_AFTER_STMT@ +FLAG_W_EXTRA = @FLAG_W_EXTRA@ +FLAG_W_NO_FORMAT_ZERO_LENGTH = @FLAG_W_NO_FORMAT_ZERO_LENGTH@ +GDB = @GDB@ +GLIBC_VERSION = @GLIBC_VERSION@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MPI_CC = @MPI_CC@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PREFERRED_STACK_BOUNDARY = @PREFERRED_STACK_BOUNDARY@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VALT_LOAD_ADDRESS = @VALT_LOAD_ADDRESS@ +VERSION = @VERSION@ +VEX_DIR = @VEX_DIR@ +VGCONF_ARCH_PRI = @VGCONF_ARCH_PRI@ +VGCONF_OS = @VGCONF_OS@ +VGCONF_PLATFORM_PRI_CAPS = @VGCONF_PLATFORM_PRI_CAPS@ +VGCONF_PLATFORM_SEC_CAPS = @VGCONF_PLATFORM_SEC_CAPS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = . tests docs +valdir = $(libdir)/valgrind +inplacedir = $(top_builddir)/.in_place + +# Baseline flags for all compilations. Aim here is to maximise +# performance and get whatever useful warnings we can out of gcc. +AM_CFLAGS_BASE = -O2 -g -Wmissing-prototypes -Wall -Wshadow \ + -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations \ + @FLAG_W_NO_FORMAT_ZERO_LENGTH@ \ + -fno-strict-aliasing + + +# These flags are used for building the preload shared objects. +# The aim is to give reasonable performance but also to have good +# stack traces, since users often see stack traces extending +# into (and through) the preloads. +AM_CFLAGS_PIC = -O -g -fpic -fno-omit-frame-pointer -fno-strict-aliasing + +# Flags for specific targets. +# +# Nb: the AM_CPPFLAGS_* values are suitable for building tools and auxprogs. +# For building the core, coregrind/Makefile.am files add some extra things. +# +# Also: in newer versions of automake (1.10 onwards?) asm files ending with +# '.S' are considered "pre-processed" (as opposed to those ending in '.s') +# and so the CPPFLAGS are passed to the assembler. But this is not true for +# older automakes (e.g. 1.8.5, 1.9.6), sigh. So we include +# AM_CPPFLAGS_<PLATFORM> in each AM_CCASFLAGS_<PLATFORM> variable. This +# means some of the flags are duplicated on systems with newer versions of +# automake, but this does not really matter and seems hard to avoid. +AM_CPPFLAGS_COMMON = \ + -I$(top_srcdir) \ + -I$(top_srcdir)/include \ + -I@VEX_DIR@/pub + +AM_FLAG_M3264_X86_LINUX = @FLAG_M32@ +AM_CPPFLAGS_X86_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_x86=1 \ + -DVGO_linux=1 \ + -DVGP_x86_linux=1 + +AM_CFLAGS_X86_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) + +AM_CCASFLAGS_X86_LINUX = $(AM_CPPFLAGS_X86_LINUX) @FLAG_M32@ -g +AM_FLAG_M3264_AMD64_LINUX = @FLAG_M64@ +AM_CPPFLAGS_AMD64_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_amd64=1 \ + -DVGO_linux=1 \ + -DVGP_amd64_linux=1 + +AM_CFLAGS_AMD64_LINUX = @FLAG_M64@ -fomit-frame-pointer \ + @PREFERRED_STACK_BOUNDARY@ $(AM_CFLAGS_BASE) + +AM_CCASFLAGS_AMD64_LINUX = $(AM_CPPFLAGS_AMD64_LINUX) @FLAG_M64@ -g +AM_FLAG_M3264_PPC32_LINUX = @FLAG_M32@ +AM_CPPFLAGS_PPC32_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc32=1 \ + -DVGO_linux=1 \ + -DVGP_ppc32_linux=1 + +AM_CFLAGS_PPC32_LINUX = @FLAG_M32@ $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC32_LINUX = $(AM_CPPFLAGS_PPC32_LINUX) @FLAG_M32@ -g +AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ +AM_CPPFLAGS_PPC64_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc64=1 \ + -DVGO_linux=1 \ + -DVGP_ppc64_linux=1 + +AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC64_LINUX = $(AM_CPPFLAGS_PPC64_LINUX) @FLAG_M64@ -g +AM_FLAG_M3264_PPC32_AIX5 = @FLAG_MAIX32@ +AM_CPPFLAGS_PPC32_AIX5 = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc32=1 \ + -DVGO_aix5=1 \ + -DVGP_ppc32_aix5=1 + +AM_CFLAGS_PPC32_AIX5 = @FLAG_MAIX32@ -mcpu=powerpc $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC32_AIX5 = $(AM_CPPFLAGS_PPC32_AIX5) \ + @FLAG_MAIX32@ -mcpu=powerpc -g + +AM_FLAG_M3264_PPC64_AIX5 = @FLAG_MAIX64@ +AM_CPPFLAGS_PPC64_AIX5 = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc64=1 \ + -DVGO_aix5=1 \ + -DVGP_ppc64_aix5=1 + +AM_CFLAGS_PPC64_AIX5 = @FLAG_MAIX64@ -mcpu=powerpc64 $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC64_AIX5 = $(AM_CPPFLAGS_PPC64_AIX5) \ + @FLAG_MAIX64@ -mcpu=powerpc64 -g + + +# Flags for the primary target. These must be used to build the +# regtests and performance tests. In fact, these must be used to +# build anything which is built only once on a dual-arch build. +# +AM_FLAG_M3264_PRI = $(AM_FLAG_M3264_@VGCONF_PLATFORM_PRI_CAPS@) +AM_CPPFLAGS_PRI = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) +AM_CFLAGS_PRI = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) +AM_CCASFLAGS_PRI = $(AM_CCASFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) +@VGCONF_HAVE_PLATFORM_SEC_CAPS_FALSE@AM_FLAG_M3264_SEC = +@VGCONF_HAVE_PLATFORM_SEC_CAPS_TRUE@AM_FLAG_M3264_SEC = $(AM_FLAG_M3264_@VGCONF_PLATFORM_SEC_CAPS@) + +# Baseline link flags for making dynamic shared objects. +# +PRELOAD_LDFLAGS_COMMON_LINUX = -nodefaultlibs -shared -Wl,-z,interpose,-z,initfirst +PRELOAD_LDFLAGS_COMMON_AIX5 = -nodefaultlibs -shared -Wl,-G -Wl,-bnogc +PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ +PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ +PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ +PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ +PRELOAD_LDFLAGS_PPC32_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) @FLAG_MAIX32@ +PRELOAD_LDFLAGS_PPC64_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) @FLAG_MAIX64@ +LIBREPLACEMALLOC_X86_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-x86-linux.a + +LIBREPLACEMALLOC_AMD64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-amd64-linux.a + +LIBREPLACEMALLOC_PPC32_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc32-linux.a + +LIBREPLACEMALLOC_PPC64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a + +LIBREPLACEMALLOC_PPC32_AIX5 = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc32-aix5.a + +LIBREPLACEMALLOC_PPC64_AIX5 = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-aix5.a + +COREGRIND_LIBS_X86_LINUX = \ + $(top_builddir)/coregrind/libcoregrind-x86-linux.a \ + @VEX_DIR@/libvex-x86-linux.a + +COREGRIND_LIBS_AMD64_LINUX = \ + $(top_builddir)/coregrind/libcoregrind-amd64-linux.a \ + @VEX_DIR@/libvex-amd64-linux.a + +COREGRIND_LIBS_PPC32_LINUX = \ + $(top_builddir)/coregrind/libcoregrind-ppc32-linux.a \ + @VEX_DIR@/libvex-ppc32-linux.a + +COREGRIND_LIBS_PPC64_LINUX = \ + $(top_builddir)/coregrind/libcoregrind-ppc64-linux.a \ + @VEX_DIR@/libvex-ppc64-linux.a + +COREGRIND_LIBS_PPC32_AIX5 = \ + $(top_builddir)/coregrind/libcoregrind-ppc32-aix5.a \ + @VEX_DIR@/libvex-ppc32-aix5.a + +COREGRIND_LIBS_PPC64_AIX5 = \ + $(top_builddir)/coregrind/libcoregrind-ppc64-aix5.a \ + @VEX_DIR@/libvex-ppc64-aix5.a + +TOOL_LDADD_COMMON = -lgcc +TOOL_LDFLAGS_COMMON_LINUX = -static \ + -Wl,-defsym,valt_load_address=@VALT_LOAD_ADDRESS@ \ + -nodefaultlibs -nostartfiles -u _start + +TOOL_LDFLAGS_COMMON_AIX5 = -static -Wl,-e_start_valgrind +TOOL_LDADD_X86_LINUX = $(COREGRIND_LIBS_X86_LINUX) $(TOOL_LDADD_COMMON) +TOOL_LDFLAGS_X86_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \ + -Wl,-T,$(top_builddir)/valt_load_address_x86_linux.lds + +TOOL_LDADD_AMD64_LINUX = $(COREGRIND_LIBS_AMD64_LINUX) $(TOOL_LDADD_COMMON) +TOOL_LDFLAGS_AMD64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ \ + -Wl,-T,$(top_builddir)/valt_load_address_amd64_linux.lds + +TOOL_LDADD_PPC32_LINUX = $(COREGRIND_LIBS_PPC32_LINUX) $(TOOL_LDADD_COMMON) +TOOL_LDFLAGS_PPC32_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \ + -Wl,-T,$(top_builddir)/valt_load_address_ppc32_linux.lds + +TOOL_LDADD_PPC64_LINUX = $(COREGRIND_LIBS_PPC64_LINUX) $(TOOL_LDADD_COMMON) +TOOL_LDFLAGS_PPC64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ \ + -Wl,-T,$(top_builddir)/valt_load_address_ppc64_linux.lds + +TOOL_LDADD_PPC32_AIX5 = $(COREGRIND_LIBS_PPC32_AIX5) $(TOOL_LDADD_COMMON) +TOOL_LDFLAGS_PPC32_AIX5 = \ + $(TOOL_LDFLAGS_COMMON_AIX5) @FLAG_MAIX32@ + +TOOL_LDADD_PPC64_AIX5 = $(COREGRIND_LIBS_PPC64_AIX5) $(TOOL_LDADD_COMMON) +TOOL_LDFLAGS_PPC64_AIX5 = \ + $(TOOL_LDFLAGS_COMMON_AIX5) @FLAG_MAIX64@ -Wl,-bbigtoc + +LIBREPLACEMALLOC_LDFLAGS_X86_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_X86_LINUX) \ + -Wl,--no-whole-archive + +LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_AMD64_LINUX) \ + -Wl,--no-whole-archive + +LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_PPC32_LINUX) \ + -Wl,--no-whole-archive + +LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_PPC64_LINUX) \ + -Wl,--no-whole-archive + +LIBREPLACEMALLOC_LDFLAGS_PPC32_AIX5 = \ + $(LIBREPLACEMALLOC_PPC32_AIX5) + +LIBREPLACEMALLOC_LDFLAGS_PPC64_AIX5 = \ + $(LIBREPLACEMALLOC_PPC64_AIX5) + +VGPRELOAD_HELGRIND_SOURCES_COMMON = hg_intercepts.c +vgpreload_helgrind_x86_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_x86_linux_so_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX) +vgpreload_helgrind_x86_linux_so_CFLAGS = $(AM_CFLAGS_X86_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_x86_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_X86_LINUX) +vgpreload_helgrind_x86_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_X86_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_X86_LINUX) + +vgpreload_helgrind_amd64_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_amd64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX) +vgpreload_helgrind_amd64_linux_so_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_amd64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_AMD64_LINUX) +vgpreload_helgrind_amd64_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_AMD64_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX) + +vgpreload_helgrind_ppc32_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc32_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX) +vgpreload_helgrind_ppc32_linux_so_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc32_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_LINUX) +vgpreload_helgrind_ppc32_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC32_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX) + +vgpreload_helgrind_ppc64_linux_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX) +vgpreload_helgrind_ppc64_linux_so_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_LINUX) +vgpreload_helgrind_ppc64_linux_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC64_LINUX) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX) + +vgpreload_helgrind_ppc32_aix5_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc32_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5) +vgpreload_helgrind_ppc32_aix5_so_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc32_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_AIX5) +vgpreload_helgrind_ppc32_aix5_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC32_AIX5) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC32_AIX5) + +vgpreload_helgrind_ppc64_aix5_so_SOURCES = $(VGPRELOAD_HELGRIND_SOURCES_COMMON) +vgpreload_helgrind_ppc64_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5) +vgpreload_helgrind_ppc64_aix5_so_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) $(AM_CFLAGS_PIC) +vgpreload_helgrind_ppc64_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_AIX5) +vgpreload_helgrind_ppc64_aix5_so_LDFLAGS = \ + $(PRELOAD_LDFLAGS_PPC64_AIX5) \ + $(LIBREPLACEMALLOC_LDFLAGS_PPC64_AIX5) + +HELGRIND_SOURCES_COMMON = \ + hg_basics.c hg_lock_n_thread.c hg_wordset.c libhb_core.c \ + hg_errors.c hg_main.c + +helgrind_x86_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_x86_linux_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX) +helgrind_x86_linux_CFLAGS = $(AM_CFLAGS_X86_LINUX) -O2 +helgrind_x86_linux_DEPENDENCIES = $(COREGRIND_LIBS_X86_LINUX) +helgrind_x86_linux_LDADD = $(TOOL_LDADD_X86_LINUX) +helgrind_x86_linux_LDFLAGS = $(TOOL_LDFLAGS_X86_LINUX) +helgrind_amd64_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_amd64_linux_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX) +helgrind_amd64_linux_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) -O2 +helgrind_amd64_linux_DEPENDENCIES = $(COREGRIND_LIBS_AMD64_LINUX) +helgrind_amd64_linux_LDADD = $(TOOL_LDADD_AMD64_LINUX) +helgrind_amd64_linux_LDFLAGS = $(TOOL_LDFLAGS_AMD64_LINUX) +helgrind_ppc32_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc32_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX) +helgrind_ppc32_linux_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) -O2 +helgrind_ppc32_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_LINUX) +helgrind_ppc32_linux_LDADD = $(TOOL_LDADD_PPC32_LINUX) +helgrind_ppc32_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC32_LINUX) +helgrind_ppc64_linux_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc64_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX) +helgrind_ppc64_linux_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) -O2 +helgrind_ppc64_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_LINUX) +helgrind_ppc64_linux_LDADD = $(TOOL_LDADD_PPC64_LINUX) +helgrind_ppc64_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC64_LINUX) +helgrind_ppc32_aix5_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc32_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5) +helgrind_ppc32_aix5_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) -O2 +helgrind_ppc32_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_AIX5) +helgrind_ppc32_aix5_LDADD = $(TOOL_LDADD_PPC32_AIX5) +helgrind_ppc32_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC32_AIX5) +helgrind_ppc64_aix5_SOURCES = $(HELGRIND_SOURCES_COMMON) +helgrind_ppc64_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5) +helgrind_ppc64_aix5_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) -O2 +helgrind_ppc64_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_AIX5) +helgrind_ppc64_aix5_LDADD = $(TOOL_LDADD_PPC64_AIX5) +helgrind_ppc64_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC64_AIX5) +hgincludedir = $(includedir)/valgrind +hginclude_HEADERS = helgrind.h +noinst_HEADERS = \ + hg_basics.h hg_lock_n_thread.h hg_errors.h hg_wordset.h \ + libhb.h + +EXTRA_DIST = README_MSMProp2.txt README_YARD.txt +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.tool.am $(top_srcdir)/Makefile.all.am $(top_srcdir)/Makefile.flags.am $(top_srcdir)/Makefile.core-tool.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign helgrind/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign helgrind/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) +helgrind-amd64-linux$(EXEEXT): $(helgrind_amd64_linux_OBJECTS) $(helgrind_amd64_linux_DEPENDENCIES) + @rm -f helgrind-amd64-linux$(EXEEXT) + $(helgrind_amd64_linux_LINK) $(helgrind_amd64_linux_OBJECTS) $(helgrind_amd64_linux_LDADD) $(LIBS) +helgrind-ppc32-aix5$(EXEEXT): $(helgrind_ppc32_aix5_OBJECTS) $(helgrind_ppc32_aix5_DEPENDENCIES) + @rm -f helgrind-ppc32-aix5$(EXEEXT) + $(helgrind_ppc32_aix5_LINK) $(helgrind_ppc32_aix5_OBJECTS) $(helgrind_ppc32_aix5_LDADD) $(LIBS) +helgrind-ppc32-linux$(EXEEXT): $(helgrind_ppc32_linux_OBJECTS) $(helgrind_ppc32_linux_DEPENDENCIES) + @rm -f helgrind-ppc32-linux$(EXEEXT) + $(helgrind_ppc32_linux_LINK) $(helgrind_ppc32_linux_OBJECTS) $(helgrind_ppc32_linux_LDADD) $(LIBS) +helgrind-ppc64-aix5$(EXEEXT): $(helgrind_ppc64_aix5_OBJECTS) $(helgrind_ppc64_aix5_DEPENDENCIES) + @rm -f helgrind-ppc64-aix5$(EXEEXT) + $(helgrind_ppc64_aix5_LINK) $(helgrind_ppc64_aix5_OBJECTS) $(helgrind_ppc64_aix5_LDADD) $(LIBS) +helgrind-ppc64-linux$(EXEEXT): $(helgrind_ppc64_linux_OBJECTS) $(helgrind_ppc64_linux_DEPENDENCIES) + @rm -f helgrind-ppc64-linux$(EXEEXT) + $(helgrind_ppc64_linux_LINK) $(helgrind_ppc64_linux_OBJECTS) $(helgrind_ppc64_linux_LDADD) $(LIBS) +helgrind-x86-linux$(EXEEXT): $(helgrind_x86_linux_OBJECTS) $(helgrind_x86_linux_DEPENDENCIES) + @rm -f helgrind-x86-linux$(EXEEXT) + $(helgrind_x86_linux_LINK) $(helgrind_x86_linux_OBJECTS) $(helgrind_x86_linux_LDADD) $(LIBS) +vgpreload_helgrind-amd64-linux.so$(EXEEXT): $(vgpreload_helgrind_amd64_linux_so_OBJECTS) $(vgpreload_helgrind_amd64_linux_so_DEPENDENCIES) + @rm -f vgpreload_helgrind-amd64-linux.so$(EXEEXT) + $(vgpreload_helgrind_amd64_linux_so_LINK) $(vgpreload_helgrind_amd64_linux_so_OBJECTS) $(vgpreload_helgrind_amd64_linux_so_LDADD) $(LIBS) +vgpreload_helgrind-ppc32-aix5.so$(EXEEXT): $(vgpreload_helgrind_ppc32_aix5_so_OBJECTS) $(vgpreload_helgrind_ppc32_aix5_so_DEPENDENCIES) + @rm -f vgpreload_helgrind-ppc32-aix5.so$(EXEEXT) + $(vgpreload_helgrind_ppc32_aix5_so_LINK) $(vgpreload_helgrind_ppc32_aix5_so_OBJECTS) $(vgpreload_helgrind_ppc32_aix5_so_LDADD) $(LIBS) +vgpreload_helgrind-ppc32-linux.so$(EXEEXT): $(vgpreload_helgrind_ppc32_linux_so_OBJECTS) $(vgpreload_helgrind_ppc32_linux_so_DEPENDENCIES) + @rm -f vgpreload_helgrind-ppc32-linux.so$(EXEEXT) + $(vgpreload_helgrind_ppc32_linux_so_LINK) $(vgpreload_helgrind_ppc32_linux_so_OBJECTS) $(vgpreload_helgrind_ppc32_linux_so_LDADD) $(LIBS) +vgpreload_helgrind-ppc64-aix5.so$(EXEEXT): $(vgpreload_helgrind_ppc64_aix5_so_OBJECTS) $(vgpreload_helgrind_ppc64_aix5_so_DEPENDENCIES) + @rm -f vgpreload_helgrind-ppc64-aix5.so$(EXEEXT) + $(vgpreload_helgrind_ppc64_aix5_so_LINK) $(vgpreload_helgrind_ppc64_aix5_so_OBJECTS) $(vgpreload_helgrind_ppc64_aix5_so_LDADD) $(LIBS) +vgpreload_helgrind-ppc64-linux.so$(EXEEXT): $(vgpreload_helgrind_ppc64_linux_so_OBJECTS) $(vgpreload_helgrind_ppc64_linux_so_DEPENDENCIES) + @rm -f vgpreload_helgrind-ppc64-linux.so$(EXEEXT) + $(vgpreload_helgrind_ppc64_linux_so_LINK) $(vgpreload_helgrind_ppc64_linux_so_OBJECTS) $(vgpreload_helgrind_ppc64_linux_so_LDADD) $(LIBS) +vgpreload_helgrind-x86-linux.so$(EXEEXT): $(vgpreload_helgrind_x86_linux_so_OBJECTS) $(vgpreload_helgrind_x86_linux_so_DEPENDENCIES) + @rm -f vgpreload_helgrind-x86-linux.so$(EXEEXT) + $(vgpreload_helgrind_x86_linux_so_LINK) $(vgpreload_helgrind_x86_linux_so_OBJECTS) $(vgpreload_helgrind_x86_linux_so_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_amd64_linux-hg_basics.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_amd64_linux-hg_errors.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_amd64_linux-hg_lock_n_thread.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_amd64_linux-hg_main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_amd64_linux-hg_wordset.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_amd64_linux-libhb_core.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc32_aix5-hg_basics.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc32_aix5-hg_errors.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc32_aix5-hg_lock_n_thread.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc32_aix5-hg_main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc32_aix5-hg_wordset.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc32_aix5-libhb_core.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc32_linux-hg_basics.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc32_linux-hg_errors.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc32_linux-hg_lock_n_thread.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc32_linux-hg_main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc32_linux-hg_wordset.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc32_linux-libhb_core.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc64_aix5-hg_basics.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc64_aix5-hg_errors.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc64_aix5-hg_lock_n_thread.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc64_aix5-hg_main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc64_aix5-hg_wordset.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc64_aix5-libhb_core.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc64_linux-hg_basics.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc64_linux-hg_errors.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc64_linux-hg_lock_n_thread.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc64_linux-hg_main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc64_linux-hg_wordset.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_ppc64_linux-libhb_core.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_x86_linux-hg_basics.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_x86_linux-hg_errors.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_x86_linux-hg_lock_n_thread.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_x86_linux-hg_main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_x86_linux-hg_wordset.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helgrind_x86_linux-libhb_core.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vgpreload_helgrind_x86_linux_so-hg_intercepts.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +helgrind_amd64_linux-hg_basics.o: hg_basics.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_basics.o -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_basics.Tpo -c -o helgrind_amd64_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_amd64_linux-hg_basics.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_basics.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_basics.c' object='helgrind_amd64_linux-hg_basics.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + +helgrind_amd64_linux-hg_basics.obj: hg_basics.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_basics.obj -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_basics.Tpo -c -o helgrind_amd64_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_amd64_linux-hg_basics.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_basics.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_basics.c' object='helgrind_amd64_linux-hg_basics.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + +helgrind_amd64_linux-hg_lock_n_thread.o: hg_lock_n_thread.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_lock_n_thread.o -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_lock_n_thread.Tpo -c -o helgrind_amd64_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_amd64_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_lock_n_thread.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_lock_n_thread.c' object='helgrind_amd64_linux-hg_lock_n_thread.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + +helgrind_amd64_linux-hg_lock_n_thread.obj: hg_lock_n_thread.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_lock_n_thread.obj -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_lock_n_thread.Tpo -c -o helgrind_amd64_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_amd64_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_lock_n_thread.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_lock_n_thread.c' object='helgrind_amd64_linux-hg_lock_n_thread.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + +helgrind_amd64_linux-hg_wordset.o: hg_wordset.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_wordset.o -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_wordset.Tpo -c -o helgrind_amd64_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_amd64_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_wordset.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_wordset.c' object='helgrind_amd64_linux-hg_wordset.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + +helgrind_amd64_linux-hg_wordset.obj: hg_wordset.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_wordset.obj -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_wordset.Tpo -c -o helgrind_amd64_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_amd64_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_wordset.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_wordset.c' object='helgrind_amd64_linux-hg_wordset.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + +helgrind_amd64_linux-libhb_core.o: libhb_core.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-libhb_core.o -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-libhb_core.Tpo -c -o helgrind_amd64_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_amd64_linux-libhb_core.Tpo $(DEPDIR)/helgrind_amd64_linux-libhb_core.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhb_core.c' object='helgrind_amd64_linux-libhb_core.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + +helgrind_amd64_linux-libhb_core.obj: libhb_core.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-libhb_core.obj -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-libhb_core.Tpo -c -o helgrind_amd64_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_amd64_linux-libhb_core.Tpo $(DEPDIR)/helgrind_amd64_linux-libhb_core.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhb_core.c' object='helgrind_amd64_linux-libhb_core.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + +helgrind_amd64_linux-hg_errors.o: hg_errors.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_errors.o -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_errors.Tpo -c -o helgrind_amd64_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_amd64_linux-hg_errors.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_errors.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_errors.c' object='helgrind_amd64_linux-hg_errors.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + +helgrind_amd64_linux-hg_errors.obj: hg_errors.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_errors.obj -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_errors.Tpo -c -o helgrind_amd64_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_amd64_linux-hg_errors.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_errors.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_errors.c' object='helgrind_amd64_linux-hg_errors.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + +helgrind_amd64_linux-hg_main.o: hg_main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_main.o -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_main.Tpo -c -o helgrind_amd64_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_amd64_linux-hg_main.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_main.c' object='helgrind_amd64_linux-hg_main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + +helgrind_amd64_linux-hg_main.obj: hg_main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -MT helgrind_amd64_linux-hg_main.obj -MD -MP -MF $(DEPDIR)/helgrind_amd64_linux-hg_main.Tpo -c -o helgrind_amd64_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_amd64_linux-hg_main.Tpo $(DEPDIR)/helgrind_amd64_linux-hg_main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_main.c' object='helgrind_amd64_linux-hg_main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_amd64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_amd64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_amd64_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + +helgrind_ppc32_aix5-hg_basics.o: hg_basics.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_basics.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_basics.Tpo -c -o helgrind_ppc32_aix5-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_basics.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_basics.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_basics.c' object='helgrind_ppc32_aix5-hg_basics.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + +helgrind_ppc32_aix5-hg_basics.obj: hg_basics.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_basics.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_basics.Tpo -c -o helgrind_ppc32_aix5-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_basics.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_basics.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_basics.c' object='helgrind_ppc32_aix5-hg_basics.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + +helgrind_ppc32_aix5-hg_lock_n_thread.o: hg_lock_n_thread.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_lock_n_thread.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_lock_n_thread.Tpo -c -o helgrind_ppc32_aix5-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_lock_n_thread.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_lock_n_thread.c' object='helgrind_ppc32_aix5-hg_lock_n_thread.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + +helgrind_ppc32_aix5-hg_lock_n_thread.obj: hg_lock_n_thread.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_lock_n_thread.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_lock_n_thread.Tpo -c -o helgrind_ppc32_aix5-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_lock_n_thread.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_lock_n_thread.c' object='helgrind_ppc32_aix5-hg_lock_n_thread.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + +helgrind_ppc32_aix5-hg_wordset.o: hg_wordset.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_wordset.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_wordset.Tpo -c -o helgrind_ppc32_aix5-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_wordset.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_wordset.c' object='helgrind_ppc32_aix5-hg_wordset.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + +helgrind_ppc32_aix5-hg_wordset.obj: hg_wordset.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_wordset.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_wordset.Tpo -c -o helgrind_ppc32_aix5-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_wordset.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_wordset.c' object='helgrind_ppc32_aix5-hg_wordset.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + +helgrind_ppc32_aix5-libhb_core.o: libhb_core.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-libhb_core.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-libhb_core.Tpo -c -o helgrind_ppc32_aix5-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_aix5-libhb_core.Tpo $(DEPDIR)/helgrind_ppc32_aix5-libhb_core.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhb_core.c' object='helgrind_ppc32_aix5-libhb_core.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + +helgrind_ppc32_aix5-libhb_core.obj: libhb_core.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-libhb_core.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-libhb_core.Tpo -c -o helgrind_ppc32_aix5-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_aix5-libhb_core.Tpo $(DEPDIR)/helgrind_ppc32_aix5-libhb_core.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhb_core.c' object='helgrind_ppc32_aix5-libhb_core.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + +helgrind_ppc32_aix5-hg_errors.o: hg_errors.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_errors.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_errors.Tpo -c -o helgrind_ppc32_aix5-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_errors.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_errors.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_errors.c' object='helgrind_ppc32_aix5-hg_errors.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + +helgrind_ppc32_aix5-hg_errors.obj: hg_errors.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_errors.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_errors.Tpo -c -o helgrind_ppc32_aix5-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_errors.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_errors.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_errors.c' object='helgrind_ppc32_aix5-hg_errors.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + +helgrind_ppc32_aix5-hg_main.o: hg_main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_main.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_main.Tpo -c -o helgrind_ppc32_aix5-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_main.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_main.c' object='helgrind_ppc32_aix5-hg_main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + +helgrind_ppc32_aix5-hg_main.obj: hg_main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_aix5-hg_main.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_aix5-hg_main.Tpo -c -o helgrind_ppc32_aix5-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_aix5-hg_main.Tpo $(DEPDIR)/helgrind_ppc32_aix5-hg_main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_main.c' object='helgrind_ppc32_aix5-hg_main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_aix5-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + +helgrind_ppc32_linux-hg_basics.o: hg_basics.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_basics.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_basics.Tpo -c -o helgrind_ppc32_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_basics.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_basics.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_basics.c' object='helgrind_ppc32_linux-hg_basics.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + +helgrind_ppc32_linux-hg_basics.obj: hg_basics.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_basics.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_basics.Tpo -c -o helgrind_ppc32_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_basics.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_basics.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_basics.c' object='helgrind_ppc32_linux-hg_basics.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + +helgrind_ppc32_linux-hg_lock_n_thread.o: hg_lock_n_thread.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_lock_n_thread.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_lock_n_thread.Tpo -c -o helgrind_ppc32_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_lock_n_thread.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_lock_n_thread.c' object='helgrind_ppc32_linux-hg_lock_n_thread.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + +helgrind_ppc32_linux-hg_lock_n_thread.obj: hg_lock_n_thread.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_lock_n_thread.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_lock_n_thread.Tpo -c -o helgrind_ppc32_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_lock_n_thread.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_lock_n_thread.c' object='helgrind_ppc32_linux-hg_lock_n_thread.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + +helgrind_ppc32_linux-hg_wordset.o: hg_wordset.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_wordset.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_wordset.Tpo -c -o helgrind_ppc32_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_wordset.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_wordset.c' object='helgrind_ppc32_linux-hg_wordset.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + +helgrind_ppc32_linux-hg_wordset.obj: hg_wordset.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_wordset.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_wordset.Tpo -c -o helgrind_ppc32_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_wordset.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_wordset.c' object='helgrind_ppc32_linux-hg_wordset.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + +helgrind_ppc32_linux-libhb_core.o: libhb_core.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-libhb_core.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-libhb_core.Tpo -c -o helgrind_ppc32_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_linux-libhb_core.Tpo $(DEPDIR)/helgrind_ppc32_linux-libhb_core.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhb_core.c' object='helgrind_ppc32_linux-libhb_core.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + +helgrind_ppc32_linux-libhb_core.obj: libhb_core.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-libhb_core.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-libhb_core.Tpo -c -o helgrind_ppc32_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_linux-libhb_core.Tpo $(DEPDIR)/helgrind_ppc32_linux-libhb_core.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhb_core.c' object='helgrind_ppc32_linux-libhb_core.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + +helgrind_ppc32_linux-hg_errors.o: hg_errors.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_errors.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_errors.Tpo -c -o helgrind_ppc32_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_errors.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_errors.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_errors.c' object='helgrind_ppc32_linux-hg_errors.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + +helgrind_ppc32_linux-hg_errors.obj: hg_errors.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_errors.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_errors.Tpo -c -o helgrind_ppc32_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_errors.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_errors.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_errors.c' object='helgrind_ppc32_linux-hg_errors.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + +helgrind_ppc32_linux-hg_main.o: hg_main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_main.o -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_main.Tpo -c -o helgrind_ppc32_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_main.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_main.c' object='helgrind_ppc32_linux-hg_main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + +helgrind_ppc32_linux-hg_main.obj: hg_main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc32_linux-hg_main.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc32_linux-hg_main.Tpo -c -o helgrind_ppc32_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc32_linux-hg_main.Tpo $(DEPDIR)/helgrind_ppc32_linux-hg_main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_main.c' object='helgrind_ppc32_linux-hg_main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc32_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc32_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc32_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + +helgrind_ppc64_aix5-hg_basics.o: hg_basics.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_basics.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_basics.Tpo -c -o helgrind_ppc64_aix5-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_basics.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_basics.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_basics.c' object='helgrind_ppc64_aix5-hg_basics.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + +helgrind_ppc64_aix5-hg_basics.obj: hg_basics.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_basics.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_basics.Tpo -c -o helgrind_ppc64_aix5-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_basics.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_basics.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_basics.c' object='helgrind_ppc64_aix5-hg_basics.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + +helgrind_ppc64_aix5-hg_lock_n_thread.o: hg_lock_n_thread.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_lock_n_thread.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_lock_n_thread.Tpo -c -o helgrind_ppc64_aix5-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_lock_n_thread.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_lock_n_thread.c' object='helgrind_ppc64_aix5-hg_lock_n_thread.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + +helgrind_ppc64_aix5-hg_lock_n_thread.obj: hg_lock_n_thread.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_lock_n_thread.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_lock_n_thread.Tpo -c -o helgrind_ppc64_aix5-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_lock_n_thread.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_lock_n_thread.c' object='helgrind_ppc64_aix5-hg_lock_n_thread.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + +helgrind_ppc64_aix5-hg_wordset.o: hg_wordset.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_wordset.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_wordset.Tpo -c -o helgrind_ppc64_aix5-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_wordset.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_wordset.c' object='helgrind_ppc64_aix5-hg_wordset.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + +helgrind_ppc64_aix5-hg_wordset.obj: hg_wordset.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_wordset.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_wordset.Tpo -c -o helgrind_ppc64_aix5-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_wordset.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_wordset.c' object='helgrind_ppc64_aix5-hg_wordset.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + +helgrind_ppc64_aix5-libhb_core.o: libhb_core.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-libhb_core.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-libhb_core.Tpo -c -o helgrind_ppc64_aix5-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_aix5-libhb_core.Tpo $(DEPDIR)/helgrind_ppc64_aix5-libhb_core.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhb_core.c' object='helgrind_ppc64_aix5-libhb_core.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + +helgrind_ppc64_aix5-libhb_core.obj: libhb_core.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-libhb_core.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-libhb_core.Tpo -c -o helgrind_ppc64_aix5-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_aix5-libhb_core.Tpo $(DEPDIR)/helgrind_ppc64_aix5-libhb_core.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhb_core.c' object='helgrind_ppc64_aix5-libhb_core.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + +helgrind_ppc64_aix5-hg_errors.o: hg_errors.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_errors.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_errors.Tpo -c -o helgrind_ppc64_aix5-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_errors.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_errors.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_errors.c' object='helgrind_ppc64_aix5-hg_errors.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + +helgrind_ppc64_aix5-hg_errors.obj: hg_errors.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_errors.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_errors.Tpo -c -o helgrind_ppc64_aix5-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_errors.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_errors.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_errors.c' object='helgrind_ppc64_aix5-hg_errors.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + +helgrind_ppc64_aix5-hg_main.o: hg_main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_main.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_main.Tpo -c -o helgrind_ppc64_aix5-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_main.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_main.c' object='helgrind_ppc64_aix5-hg_main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + +helgrind_ppc64_aix5-hg_main.obj: hg_main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_aix5-hg_main.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_aix5-hg_main.Tpo -c -o helgrind_ppc64_aix5-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_aix5-hg_main.Tpo $(DEPDIR)/helgrind_ppc64_aix5-hg_main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_main.c' object='helgrind_ppc64_aix5-hg_main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_aix5_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_aix5_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_aix5-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + +helgrind_ppc64_linux-hg_basics.o: hg_basics.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_basics.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_basics.Tpo -c -o helgrind_ppc64_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_basics.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_basics.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_basics.c' object='helgrind_ppc64_linux-hg_basics.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + +helgrind_ppc64_linux-hg_basics.obj: hg_basics.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_basics.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_basics.Tpo -c -o helgrind_ppc64_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_basics.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_basics.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_basics.c' object='helgrind_ppc64_linux-hg_basics.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + +helgrind_ppc64_linux-hg_lock_n_thread.o: hg_lock_n_thread.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_lock_n_thread.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_lock_n_thread.Tpo -c -o helgrind_ppc64_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_lock_n_thread.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_lock_n_thread.c' object='helgrind_ppc64_linux-hg_lock_n_thread.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + +helgrind_ppc64_linux-hg_lock_n_thread.obj: hg_lock_n_thread.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_lock_n_thread.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_lock_n_thread.Tpo -c -o helgrind_ppc64_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_lock_n_thread.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_lock_n_thread.c' object='helgrind_ppc64_linux-hg_lock_n_thread.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + +helgrind_ppc64_linux-hg_wordset.o: hg_wordset.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_wordset.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_wordset.Tpo -c -o helgrind_ppc64_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_wordset.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_wordset.c' object='helgrind_ppc64_linux-hg_wordset.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + +helgrind_ppc64_linux-hg_wordset.obj: hg_wordset.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_wordset.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_wordset.Tpo -c -o helgrind_ppc64_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_wordset.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_wordset.c' object='helgrind_ppc64_linux-hg_wordset.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + +helgrind_ppc64_linux-libhb_core.o: libhb_core.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-libhb_core.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-libhb_core.Tpo -c -o helgrind_ppc64_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_linux-libhb_core.Tpo $(DEPDIR)/helgrind_ppc64_linux-libhb_core.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhb_core.c' object='helgrind_ppc64_linux-libhb_core.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + +helgrind_ppc64_linux-libhb_core.obj: libhb_core.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-libhb_core.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-libhb_core.Tpo -c -o helgrind_ppc64_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_linux-libhb_core.Tpo $(DEPDIR)/helgrind_ppc64_linux-libhb_core.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhb_core.c' object='helgrind_ppc64_linux-libhb_core.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + +helgrind_ppc64_linux-hg_errors.o: hg_errors.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_errors.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_errors.Tpo -c -o helgrind_ppc64_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_errors.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_errors.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_errors.c' object='helgrind_ppc64_linux-hg_errors.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + +helgrind_ppc64_linux-hg_errors.obj: hg_errors.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_errors.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_errors.Tpo -c -o helgrind_ppc64_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_errors.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_errors.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_errors.c' object='helgrind_ppc64_linux-hg_errors.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + +helgrind_ppc64_linux-hg_main.o: hg_main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_main.o -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_main.Tpo -c -o helgrind_ppc64_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_main.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_main.c' object='helgrind_ppc64_linux-hg_main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + +helgrind_ppc64_linux-hg_main.obj: hg_main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -MT helgrind_ppc64_linux-hg_main.obj -MD -MP -MF $(DEPDIR)/helgrind_ppc64_linux-hg_main.Tpo -c -o helgrind_ppc64_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_ppc64_linux-hg_main.Tpo $(DEPDIR)/helgrind_ppc64_linux-hg_main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_main.c' object='helgrind_ppc64_linux-hg_main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_ppc64_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_ppc64_linux_CFLAGS) $(CFLAGS) -c -o helgrind_ppc64_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + +helgrind_x86_linux-hg_basics.o: hg_basics.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_basics.o -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_basics.Tpo -c -o helgrind_x86_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_x86_linux-hg_basics.Tpo $(DEPDIR)/helgrind_x86_linux-hg_basics.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_basics.c' object='helgrind_x86_linux-hg_basics.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_basics.o `test -f 'hg_basics.c' || echo '$(srcdir)/'`hg_basics.c + +helgrind_x86_linux-hg_basics.obj: hg_basics.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_basics.obj -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_basics.Tpo -c -o helgrind_x86_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_x86_linux-hg_basics.Tpo $(DEPDIR)/helgrind_x86_linux-hg_basics.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_basics.c' object='helgrind_x86_linux-hg_basics.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_basics.obj `if test -f 'hg_basics.c'; then $(CYGPATH_W) 'hg_basics.c'; else $(CYGPATH_W) '$(srcdir)/hg_basics.c'; fi` + +helgrind_x86_linux-hg_lock_n_thread.o: hg_lock_n_thread.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_lock_n_thread.o -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_lock_n_thread.Tpo -c -o helgrind_x86_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_x86_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_x86_linux-hg_lock_n_thread.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_lock_n_thread.c' object='helgrind_x86_linux-hg_lock_n_thread.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_lock_n_thread.o `test -f 'hg_lock_n_thread.c' || echo '$(srcdir)/'`hg_lock_n_thread.c + +helgrind_x86_linux-hg_lock_n_thread.obj: hg_lock_n_thread.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_lock_n_thread.obj -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_lock_n_thread.Tpo -c -o helgrind_x86_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_x86_linux-hg_lock_n_thread.Tpo $(DEPDIR)/helgrind_x86_linux-hg_lock_n_thread.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_lock_n_thread.c' object='helgrind_x86_linux-hg_lock_n_thread.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_lock_n_thread.obj `if test -f 'hg_lock_n_thread.c'; then $(CYGPATH_W) 'hg_lock_n_thread.c'; else $(CYGPATH_W) '$(srcdir)/hg_lock_n_thread.c'; fi` + +helgrind_x86_linux-hg_wordset.o: hg_wordset.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_wordset.o -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_wordset.Tpo -c -o helgrind_x86_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_x86_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_x86_linux-hg_wordset.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_wordset.c' object='helgrind_x86_linux-hg_wordset.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_wordset.o `test -f 'hg_wordset.c' || echo '$(srcdir)/'`hg_wordset.c + +helgrind_x86_linux-hg_wordset.obj: hg_wordset.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_wordset.obj -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_wordset.Tpo -c -o helgrind_x86_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_x86_linux-hg_wordset.Tpo $(DEPDIR)/helgrind_x86_linux-hg_wordset.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_wordset.c' object='helgrind_x86_linux-hg_wordset.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_wordset.obj `if test -f 'hg_wordset.c'; then $(CYGPATH_W) 'hg_wordset.c'; else $(CYGPATH_W) '$(srcdir)/hg_wordset.c'; fi` + +helgrind_x86_linux-libhb_core.o: libhb_core.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-libhb_core.o -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-libhb_core.Tpo -c -o helgrind_x86_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_x86_linux-libhb_core.Tpo $(DEPDIR)/helgrind_x86_linux-libhb_core.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhb_core.c' object='helgrind_x86_linux-libhb_core.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-libhb_core.o `test -f 'libhb_core.c' || echo '$(srcdir)/'`libhb_core.c + +helgrind_x86_linux-libhb_core.obj: libhb_core.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-libhb_core.obj -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-libhb_core.Tpo -c -o helgrind_x86_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_x86_linux-libhb_core.Tpo $(DEPDIR)/helgrind_x86_linux-libhb_core.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhb_core.c' object='helgrind_x86_linux-libhb_core.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-libhb_core.obj `if test -f 'libhb_core.c'; then $(CYGPATH_W) 'libhb_core.c'; else $(CYGPATH_W) '$(srcdir)/libhb_core.c'; fi` + +helgrind_x86_linux-hg_errors.o: hg_errors.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_errors.o -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_errors.Tpo -c -o helgrind_x86_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_x86_linux-hg_errors.Tpo $(DEPDIR)/helgrind_x86_linux-hg_errors.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_errors.c' object='helgrind_x86_linux-hg_errors.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_errors.o `test -f 'hg_errors.c' || echo '$(srcdir)/'`hg_errors.c + +helgrind_x86_linux-hg_errors.obj: hg_errors.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_errors.obj -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_errors.Tpo -c -o helgrind_x86_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_x86_linux-hg_errors.Tpo $(DEPDIR)/helgrind_x86_linux-hg_errors.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_errors.c' object='helgrind_x86_linux-hg_errors.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_errors.obj `if test -f 'hg_errors.c'; then $(CYGPATH_W) 'hg_errors.c'; else $(CYGPATH_W) '$(srcdir)/hg_errors.c'; fi` + +helgrind_x86_linux-hg_main.o: hg_main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_main.o -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_main.Tpo -c -o helgrind_x86_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_x86_linux-hg_main.Tpo $(DEPDIR)/helgrind_x86_linux-hg_main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_main.c' object='helgrind_x86_linux-hg_main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_main.o `test -f 'hg_main.c' || echo '$(srcdir)/'`hg_main.c + +helgrind_x86_linux-hg_main.obj: hg_main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -MT helgrind_x86_linux-hg_main.obj -MD -MP -MF $(DEPDIR)/helgrind_x86_linux-hg_main.Tpo -c -o helgrind_x86_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/helgrind_x86_linux-hg_main.Tpo $(DEPDIR)/helgrind_x86_linux-hg_main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_main.c' object='helgrind_x86_linux-hg_main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(helgrind_x86_linux_CPPFLAGS) $(CPPFLAGS) $(helgrind_x86_linux_CFLAGS) $(CFLAGS) -c -o helgrind_x86_linux-hg_main.obj `if test -f 'hg_main.c'; then $(CYGPATH_W) 'hg_main.c'; else $(CYGPATH_W) '$(srcdir)/hg_main.c'; fi` + +vgpreload_helgrind_amd64_linux_so-hg_intercepts.o: hg_intercepts.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_amd64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_amd64_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_amd64_linux_so-hg_intercepts.o -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_amd64_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_intercepts.c' object='vgpreload_helgrind_amd64_linux_so-hg_intercepts.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_amd64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_amd64_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_amd64_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + +vgpreload_helgrind_amd64_linux_so-hg_intercepts.obj: hg_intercepts.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_amd64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_amd64_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_amd64_linux_so-hg_intercepts.obj -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_amd64_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_amd64_linux_so-hg_intercepts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_intercepts.c' object='vgpreload_helgrind_amd64_linux_so-hg_intercepts.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_amd64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_amd64_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_amd64_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + +vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.o: hg_intercepts.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_aix5_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.o -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_intercepts.c' object='vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_aix5_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + +vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.obj: hg_intercepts.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_aix5_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.obj -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_intercepts.c' object='vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_aix5_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc32_aix5_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + +vgpreload_helgrind_ppc32_linux_so-hg_intercepts.o: hg_intercepts.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc32_linux_so-hg_intercepts.o -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc32_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_intercepts.c' object='vgpreload_helgrind_ppc32_linux_so-hg_intercepts.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc32_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + +vgpreload_helgrind_ppc32_linux_so-hg_intercepts.obj: hg_intercepts.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc32_linux_so-hg_intercepts.obj -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc32_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc32_linux_so-hg_intercepts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_intercepts.c' object='vgpreload_helgrind_ppc32_linux_so-hg_intercepts.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc32_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc32_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc32_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + +vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.o: hg_intercepts.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_aix5_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.o -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_intercepts.c' object='vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_aix5_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + +vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.obj: hg_intercepts.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_aix5_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.obj -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_intercepts.c' object='vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_aix5_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_aix5_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc64_aix5_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + +vgpreload_helgrind_ppc64_linux_so-hg_intercepts.o: hg_intercepts.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc64_linux_so-hg_intercepts.o -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc64_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_intercepts.c' object='vgpreload_helgrind_ppc64_linux_so-hg_intercepts.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc64_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + +vgpreload_helgrind_ppc64_linux_so-hg_intercepts.obj: hg_intercepts.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_ppc64_linux_so-hg_intercepts.obj -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_ppc64_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_ppc64_linux_so-hg_intercepts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_intercepts.c' object='vgpreload_helgrind_ppc64_linux_so-hg_intercepts.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_ppc64_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_ppc64_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_ppc64_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` + +vgpreload_helgrind_x86_linux_so-hg_intercepts.o: hg_intercepts.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_x86_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_x86_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_x86_linux_so-hg_intercepts.o -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_x86_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_x86_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vgpreload_helgrind_x86_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_x86_linux_so-hg_intercepts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_intercepts.c' object='vgpreload_helgrind_x86_linux_so-hg_intercepts.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_x86_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_x86_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_x86_linux_so-hg_intercepts.o `test -f 'hg_intercepts.c' || echo '$(srcdir)/'`hg_intercepts.c + +vgpreload_helgrind_x86_linux_so-hg_intercepts.obj: hg_intercepts.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_x86_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_x86_linux_so_CFLAGS) $(CFLAGS) -MT vgpreload_helgrind_x86_linux_so-hg_intercepts.obj -MD -MP -MF $(DEPDIR)/vgpreload_helgrind_x86_linux_so-hg_intercepts.Tpo -c -o vgpreload_helgrind_x86_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vgpreload_helgrind_x86_linux_so-hg_intercepts.Tpo $(DEPDIR)/vgpreload_helgrind_x86_linux_so-hg_intercepts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hg_intercepts.c' object='vgpreload_helgrind_x86_linux_so-hg_intercepts.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vgpreload_helgrind_x86_linux_so_CPPFLAGS) $(CPPFLAGS) $(vgpreload_helgrind_x86_linux_so_CFLAGS) $(CFLAGS) -c -o vgpreload_helgrind_x86_linux_so-hg_intercepts.obj `if test -f 'hg_intercepts.c'; then $(CYGPATH_W) 'hg_intercepts.c'; else $(CYGPATH_W) '$(srcdir)/hg_intercepts.c'; fi` +install-hgincludeHEADERS: $(hginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(hgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(hgincludedir)" + @list='$(hginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(hgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(hgincludedir)/$$f'"; \ + $(hgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(hgincludedir)/$$f"; \ + done + +uninstall-hgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(hginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(hgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(hgincludedir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(PROGRAMS) $(HEADERS) all-local +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(hgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-hgincludeHEADERS + +install-dvi: install-dvi-recursive + +install-exec-am: install-exec-local + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-hgincludeHEADERS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am all-local check check-am clean clean-generic \ + clean-noinstPROGRAMS ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-exec-local \ + install-hgincludeHEADERS install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-hgincludeHEADERS + + +# The kludge that passes for vex's build system can't handle parallel +# builds. So, for the time being, serialise all Valgrind building. +# (this is equivalent to enforcing "make -j 1". +.NOTPARALLEL: + +# This is used by coregrind/Makefile.am and Makefile.tool.am for doing +# "in-place" installs. It copies $(noinst_PROGRAMS) into $inplacedir. +# It needs to be depended on by an 'all-local' rule. +inplace-noinst_PROGRAMS: + if [ -n "$(noinst_PROGRAMS)" ] ; then \ + mkdir -p $(inplacedir); \ + for f in $(noinst_PROGRAMS) ; do \ + rm -f $(inplacedir)/$$f; \ + ln -f -s ../$(subdir)/$$f $(inplacedir); \ + done ; \ + fi + +# This is used by coregrind/Makefile.am and by <tool>/Makefile.am for doing +# "make install". It copies $(noinst_PROGRAMS) into $prefix/lib/valgrind/. +# It needs to be depended on by an 'install-exec-local' rule. +install-noinst_PROGRAMS: + if [ -n "$(noinst_PROGRAMS)" ] ; then \ + $(mkinstalldirs) $(DESTDIR)$(valdir); \ + for f in $(noinst_PROGRAMS); do \ + $(INSTALL_PROGRAM) $$f $(DESTDIR)$(valdir); \ + done ; \ + fi + +@VEX_DIR@/libvex-x86-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h + $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \ + libvex-x86-linux.a \ + EXTRA_CFLAGS="$(AM_CFLAGS_X86_LINUX) @FLAG_WDECL_AFTER_STMT@ \ + @FLAG_FNO_STACK_PROTECTOR@" + +@VEX_DIR@/libvex-amd64-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h + $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \ + libvex-amd64-linux.a \ + EXTRA_CFLAGS="$(AM_CFLAGS_AMD64_LINUX) @FLAG_WDECL_AFTER_STMT@ \ + @FLAG_FNO_STACK_PROTECTOR@" + +@VEX_DIR@/libvex-ppc32-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h + $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \ + libvex-ppc32-linux.a \ + EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_LINUX) @FLAG_WDECL_AFTER_STMT@ \ + @FLAG_FNO_STACK_PROTECTOR@" + +@VEX_DIR@/libvex-ppc64-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h + $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \ + libvex-ppc64-linux.a \ + EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_LINUX) @FLAG_WDECL_AFTER_STMT@ \ + @FLAG_FNO_STACK_PROTECTOR@" + +@VEX_DIR@/libvex-ppc32-aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h + $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR) -X32" \ + libvex-ppc32-aix5.a \ + EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_AIX5) @FLAG_WDECL_AFTER_STMT@ \ + @FLAG_FNO_STACK_PROTECTOR@" + +@VEX_DIR@/libvex-ppc64-aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h + $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR) -X64" \ + libvex-ppc64-aix5.a \ + EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_AIX5) @FLAG_WDECL_AFTER_STMT@ \ + @FLAG_FNO_STACK_PROTECTOR@" + +@VEX_DIR@/priv/main/vex_svnversion.h: + $(MAKE) -C @VEX_DIR@ CC="$(CC)" version + +all-local: inplace-noinst_PROGRAMS + +install-exec-local: install-noinst_PROGRAMS +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/helgrind/README_MSMProp2.txt b/helgrind/README_MSMProp2.txt new file mode 100644 index 0000000..6b4ac5f --- /dev/null +++ b/helgrind/README_MSMProp2.txt @@ -0,0 +1,156 @@ + +MSMProp2, a simplified but functionally equivalent version of MSMProp1 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Julian Seward, OpenWorks Ltd, 19 August 2008 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Note that this file does NOT describe the state machine used in the +svn://svn.valgrind.org/branches/YARD version of Helgrind. That state +machine is different again from any previously described machine. + +See the file README_YARD.txt for more details on YARD. + + ---------------------- + +In early 2008 Konstantin Serebryany proposed "MSMProp1", a memory +state machine for data race detection. It is described at +http://code.google.com/p/data-race-test/wiki/MSMProp1 + +Implementation experiences show MSMProp1 is useful, but difficult to +implement efficiently. In particular keeping the memory usage under +control is complex and difficult. + +This note points out a key simplification of MSMProp1, which makes it +easier to implement without changing the functionality. + + +The idea +~~~~~~~~ + +The core of the idea pertains to the "Condition" entry for MSMProp1 +state machine rules E5 and E6(r). These are, respectively: + + HB(SS, currS) and its negation + ! HB(SS, currS). + +Here, SS is a set of segments, and currS is a single segment. Each +segment contains a vector timestamp. The expression "HB(SS, currS)" +is intended to denote + + for each segment S in SS . happens_before(S,currS) + +where happens_before(S,T) means that S's vector timestamp is ordered +before-or-equal to T's vector timestamp. + +In words, the expression + + for each segment S in SS . happens_before(S,currS) + +is equivalent to saying that currS has a timestamp which is +greater-than-equal to the timestamps of all the segments in SS. + +The key observation is that this is equivalent to + + happens_before( JOIN(SS), currS ) + +where JOIN is the lattice-theoretic "max" or "least upper bound" +operation on vector clocks. Given the definition of HB, +happens_before and (binary) JOIN, this is easy to prove. + + +The consequences +~~~~~~~~~~~~~~~~ + +With that observation in place, it is a short step to observe that +storing segment sets in MSMProp1 is unnecessary. Instead of +storing a segment set in each shadow value, just store and +update a single vector timestamp. The following two equivalences +hold: + + MSMProp1 MSMProp2 + + adding a segment S join-ing S's vector timestamp + to the segment-set to the current vector timestamp + + HB(SS,currS) happens_before( + currS's timestamp, + current vector timestamp ) + +Once it is no longer necessary to represent segment sets, it then +also becomes unnecessary to represent segments. This constitutes +a significant simplication to the implementation. + + +The resulting state machine, MSMProp2 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +MSMProp2 is isomorphic to MSMProp1, with the following changes: + +States are New, Read(VTS,LS), Write(VTS,LS) + +where LS is a lockset (as before) and VTS is a vector timestamp. + +For a thread T with current lockset 'currLS' and current VTS 'currVTS' +making a memory access, the new rules are + +Name Old-State Op Guard New-State Race-If + +E1 New rd True Read(currVTS,currLS) False + +E2 New wr True Write(currVTS,currLS) False + +E3 Read(oldVTS,oldLS) rd True Read(newVTS,newLS) False + +E4 Read(oldVTS,oldLS) wr True Write(newVTS,newLS) #newLS == 0 + && !hb(oldVTS,currVTS) + +E5 Write(oldVTS,oldLS) rd hb(oldVTS, Read(currVTS,currLS) False + currVTS) + +E6r Write(oldVTS,oldLS) rd !hb(oldVTS, Write(newVTS,newLS) #newLS == 0 + currVTS) && !hb(oldVTS,currVTS) + +E6w Write(oldVTS,oldLS) wr True Write(newVTS,newLS) #newLS == 0 + && !hb(oldVTS,currVTS) + + where newVTS = join2(oldVTS,currVTS) + + newLS = if hb(oldVTS,currVTS) + then currLS + else intersect(oldLS,currLS) + + hb(vts1, vts2) = vts1 happens before or is equal to vts2 + + +Interpretation of the states +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +I always found the state names in MSMProp1 confusing. Both MSMProp1 +and MSMProp2 are easier to understand if the states Read and Write are +renamed, like this: + + old name new name + + Read WriteConstraint + Write AllConstraint + +The effect of a state Read(VTS,LS) is to constrain all later-observed +writes so that either (1) the writing thread holds at least one lock +in common with LS, or (2) those writes must happen-after VTS. If +neither of those two conditions hold, a race is reported. + +Hence a Read state places a constraint on writes. + +The effect of a state Write(VTS,LS) is similar, but it applies to all +later-observed accesses: either (1) the accessing thread holds at +least one lock in common with LS, or (2) those accesses must +happen-after VTS. If neither of those two conditions hold, a race is +reported. + +Hence a Write state places a constraint on all accesses. + +If we ignore the LS component of these states, the intuitive +interpretation of the VTS component is that it states the earliest +vector-time that the next write / access may safely happen. + diff --git a/helgrind/README_YARD.txt b/helgrind/README_YARD.txt new file mode 100644 index 0000000..992769c --- /dev/null +++ b/helgrind/README_YARD.txt @@ -0,0 +1,34 @@ + +YARD, Yet Another Race Detector, built on the Helgrind framework +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Julian Seward, OpenWorks Ltd, 19 August 2008 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The YARD race detector lives in svn://svn.valgrind.org/branches/YARD. + +It uses a new and relatively simple race detection engine, based on +the idea of shadowing each memory location with two vector timestamps, +indicating respectively the "earliest safe read point" and "earliest +safe write point". As far as I know this is a novel approach. Some +features of the implementation: + +* Modularity. The entire race detection engine is placed in a + standalone library (libhb_core.c) with a simple interface (libhb.h). + This makes it easier to debug and verify the engine; indeed it can + be built as a standalone executable with test harness using "make -f + Makefile_sa". + +* Simplified and scalable storage management, so that large programs, + with many synchronisation events, can be handled. + +* Ability to report both call stacks involved in a race, without + excessive time or space overhead. + +* Pure happens before operation, so as not to give any false + positives. + +To use, build as usual and run as "--tool=helgrind". + +You can disable lock order checking with --track-lockorders=no, as it +sometimes produces an annoying amount of output. diff --git a/helgrind/docs/.svn/dir-prop-base b/helgrind/docs/.svn/dir-prop-base new file mode 100644 index 0000000..a57f544 --- /dev/null +++ b/helgrind/docs/.svn/dir-prop-base @@ -0,0 +1,7 @@ +K 10 +svn:ignore +V 21 +Makefile +Makefile.in + +END diff --git a/helgrind/docs/.svn/entries b/helgrind/docs/.svn/entries new file mode 100644 index 0000000..4538f7b --- /dev/null +++ b/helgrind/docs/.svn/entries @@ -0,0 +1,52 @@ +8 + +dir +9703 +svn://svn.valgrind.org/valgrind/trunk/helgrind/docs +svn://svn.valgrind.org/valgrind + + + +2008-12-23T11:13:07.631306Z +8871 +sewardj +has-props + +svn:special svn:externals svn:needs-lock + + + + + + + + + + + +a5019735-40e9-0310-863c-91ae7b9d1cf9 + +hg-manual.xml +file + + + + +2009-03-13T17:29:59.000000Z +60ee121bc700f3bf585058e115747df6 +2008-12-23T11:13:07.631306Z +8871 +sewardj + +Makefile.am +file + + + + +2009-03-13T17:29:59.000000Z +6c6277383d552e852c353341c208c97c +2007-11-09T22:49:28.769147Z +7116 +sewardj + diff --git a/helgrind/docs/.svn/format b/helgrind/docs/.svn/format new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/helgrind/docs/.svn/format @@ -0,0 +1 @@ +8 diff --git a/helgrind/docs/.svn/text-base/Makefile.am.svn-base b/helgrind/docs/.svn/text-base/Makefile.am.svn-base new file mode 100644 index 0000000..84f630f --- /dev/null +++ b/helgrind/docs/.svn/text-base/Makefile.am.svn-base @@ -0,0 +1 @@ +EXTRA_DIST = hg-manual.xml diff --git a/helgrind/docs/.svn/text-base/hg-manual.xml.svn-base b/helgrind/docs/.svn/text-base/hg-manual.xml.svn-base new file mode 100644 index 0000000..2a0348f --- /dev/null +++ b/helgrind/docs/.svn/text-base/hg-manual.xml.svn-base @@ -0,0 +1,1121 @@ +<?xml version="1.0"?> <!-- -*- sgml -*- --> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" +[ <!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities; ]> + + +<chapter id="hg-manual" xreflabel="Helgrind: thread error detector"> + <title>Helgrind: a thread error detector</title> + +<para>To use this tool, you must specify +<computeroutput>--tool=helgrind</computeroutput> on the Valgrind +command line.</para> + + + + +<sect1 id="hg-manual.overview" xreflabel="Overview"> +<title>Overview</title> + +<para>Helgrind is a Valgrind tool for detecting synchronisation errors +in C, C++ and Fortran programs that use the POSIX pthreads +threading primitives.</para> + +<para>The main abstractions in POSIX pthreads are: a set of threads +sharing a common address space, thread creation, thread joining, +thread exit, mutexes (locks), condition variables (inter-thread event +notifications), reader-writer locks, semaphores and barriers.</para> + +<para>Helgrind is aware of all these abstractions and tracks their +effects as accurately as it can. Currently it does not correctly +handle pthread spinlocks, although it will not object if you use them. +Adding support for spinlocks would be easy enough if the demand arises. +On x86 and amd64 platforms, it understands and partially handles +implicit locking arising from the use of the LOCK instruction prefix. +</para> + +<para>Helgrind can detect three classes of errors, which are discussed +in detail in the next three sections:</para> + +<orderedlist> + <listitem> + <para><link linkend="hg-manual.api-checks"> + Misuses of the POSIX pthreads API.</link></para> + </listitem> + <listitem> + <para><link linkend="hg-manual.lock-orders"> + Potential deadlocks arising from lock + ordering problems.</link></para> + </listitem> + <listitem> + <para><link linkend="hg-manual.data-races"> + Data races -- accessing memory without adequate locking + or synchronisation</link>. + Note that race detection in versions 3.4.0 and later uses a + different algorithm than in 3.3.x. Hence, if you have been using + Helgrind in 3.3.x, you may want to re-read this section. + </para> + </listitem> +</orderedlist> + +<para>Following those is a section containing +<link linkend="hg-manual.effective-use"> +hints and tips on how to get the best out of Helgrind.</link> +</para> + +<para>Then there is a +<link linkend="hg-manual.options">summary of command-line +options.</link> +</para> + +<para>Finally, there is +<link linkend="hg-manual.todolist">a brief summary of areas in which Helgrind +could be improved.</link> +</para> + +</sect1> + + + + +<sect1 id="hg-manual.api-checks" xreflabel="API Checks"> +<title>Detected errors: Misuses of the POSIX pthreads API</title> + +<para>Helgrind intercepts calls to many POSIX pthreads functions, and +is therefore able to report on various common problems. Although +these are unglamourous errors, their presence can lead to undefined +program behaviour and hard-to-find bugs later on. The detected errors +are:</para> + +<itemizedlist> + <listitem><para>unlocking an invalid mutex</para></listitem> + <listitem><para>unlocking a not-locked mutex</para></listitem> + <listitem><para>unlocking a mutex held by a different + thread</para></listitem> + <listitem><para>destroying an invalid or a locked mutex</para></listitem> + <listitem><para>recursively locking a non-recursive mutex</para></listitem> + <listitem><para>deallocation of memory that contains a + locked mutex</para></listitem> + <listitem><para>passing mutex arguments to functions expecting + reader-writer lock arguments, and vice + versa</para></listitem> + <listitem><para>when a POSIX pthread function fails with an + error code that must be handled</para></listitem> + <listitem><para>when a thread exits whilst still holding locked + locks</para></listitem> + <listitem><para>calling <computeroutput>pthread_cond_wait</computeroutput> + with a not-locked mutex, an invalid mutex, + or one locked by a different + thread</para></listitem> + <listitem><para>invalid or duplicate initialisation of a pthread + barrier</para></listitem> + <listitem><para>initialisation of a pthread barrier on which threads + are still waiting</para></listitem> + <listitem><para>destruction of a pthread barrier object which was + never initialised, or on which threads are still + waiting</para></listitem> + <listitem><para>waiting on an uninitialised pthread + barrier</para></listitem> + <listitem><para>for all of the pthread_ functions that Helgrind + intercepts, an error is reported, along with a stack + trace, if the system threading library routine returns + an error code, even if Helgrind itself detected no + error</para></listitem> +</itemizedlist> + +<para>Checks pertaining to the validity of mutexes are generally also +performed for reader-writer locks.</para> + +<para>Various kinds of this-can't-possibly-happen events are also +reported. These usually indicate bugs in the system threading +library.</para> + +<para>Reported errors always contain a primary stack trace indicating +where the error was detected. They may also contain auxiliary stack +traces giving additional information. In particular, most errors +relating to mutexes will also tell you where that mutex first came to +Helgrind's attention (the "<computeroutput>was first observed +at</computeroutput>" part), so you have a chance of figuring out which +mutex it is referring to. For example:</para> + +<programlisting><![CDATA[ +Thread #1 unlocked a not-locked lock at 0x7FEFFFA90 + at 0x4C2408D: pthread_mutex_unlock (hg_intercepts.c:492) + by 0x40073A: nearly_main (tc09_bad_unlock.c:27) + by 0x40079B: main (tc09_bad_unlock.c:50) + Lock at 0x7FEFFFA90 was first observed + at 0x4C25D01: pthread_mutex_init (hg_intercepts.c:326) + by 0x40071F: nearly_main (tc09_bad_unlock.c:23) + by 0x40079B: main (tc09_bad_unlock.c:50) +]]></programlisting> + +<para>Helgrind has a way of summarising thread identities, as +you see here with the text "<computeroutput>Thread +#1</computeroutput>". This is so that it can speak about threads and +sets of threads without overwhelming you with details. See +<link linkend="hg-manual.data-races.errmsgs">below</link> +for more information on interpreting error messages.</para> + +</sect1> + + + + +<sect1 id="hg-manual.lock-orders" xreflabel="Lock Orders"> +<title>Detected errors: Inconsistent Lock Orderings</title> + +<para>In this section, and in general, to "acquire" a lock simply +means to lock that lock, and to "release" a lock means to unlock +it.</para> + +<para>Helgrind monitors the order in which threads acquire locks. +This allows it to detect potential deadlocks which could arise from +the formation of cycles of locks. Detecting such inconsistencies is +useful because, whilst actual deadlocks are fairly obvious, potential +deadlocks may never be discovered during testing and could later lead +to hard-to-diagnose in-service failures.</para> + +<para>The simplest example of such a problem is as +follows.</para> + +<itemizedlist> + <listitem><para>Imagine some shared resource R, which, for whatever + reason, is guarded by two locks, L1 and L2, which must both be held + when R is accessed.</para> + </listitem> + <listitem><para>Suppose a thread acquires L1, then L2, and proceeds + to access R. The implication of this is that all threads in the + program must acquire the two locks in the order first L1 then L2. + Not doing so risks deadlock.</para> + </listitem> + <listitem><para>The deadlock could happen if two threads -- call them + T1 and T2 -- both want to access R. Suppose T1 acquires L1 first, + and T2 acquires L2 first. Then T1 tries to acquire L2, and T2 tries + to acquire L1, but those locks are both already held. So T1 and T2 + become deadlocked.</para> + </listitem> +</itemizedlist> + +<para>Helgrind builds a directed graph indicating the order in which +locks have been acquired in the past. When a thread acquires a new +lock, the graph is updated, and then checked to see if it now contains +a cycle. The presence of a cycle indicates a potential deadlock involving +the locks in the cycle.</para> + +<para>In simple situations, where the cycle only contains two locks, +Helgrind will show where the required order was established:</para> + +<programlisting><![CDATA[ +Thread #1: lock order "0x7FEFFFAB0 before 0x7FEFFFA80" violated + at 0x4C23C91: pthread_mutex_lock (hg_intercepts.c:388) + by 0x40081F: main (tc13_laog1.c:24) + Required order was established by acquisition of lock at 0x7FEFFFAB0 + at 0x4C23C91: pthread_mutex_lock (hg_intercepts.c:388) + by 0x400748: main (tc13_laog1.c:17) + followed by a later acquisition of lock at 0x7FEFFFA80 + at 0x4C23C91: pthread_mutex_lock (hg_intercepts.c:388) + by 0x400773: main (tc13_laog1.c:18) +]]></programlisting> + +<para>When there are more than two locks in the cycle, the error is +equally serious. However, at present Helgrind does not show the locks +involved, so as to avoid flooding you with information. That could be +fixed in future. For example, here is a an example involving a cycle +of five locks from a naive implementation the famous Dining +Philosophers problem +(see <computeroutput>helgrind/tests/tc14_laog_dinphils.c</computeroutput>). +In this case Helgrind has detected that all 5 philosophers could +simultaneously pick up their left fork and then deadlock whilst +waiting to pick up their right forks.</para> + +<programlisting><![CDATA[ +Thread #6: lock order "0x6010C0 before 0x601160" violated + at 0x4C23C91: pthread_mutex_lock (hg_intercepts.c:388) + by 0x4007C0: dine (tc14_laog_dinphils.c:19) + by 0x4C25DF7: mythread_wrapper (hg_intercepts.c:178) + by 0x4E2F09D: start_thread (in /lib64/libpthread-2.5.so) + by 0x51054CC: clone (in /lib64/libc-2.5.so) +]]></programlisting> + +</sect1> + + + + +<sect1 id="hg-manual.data-races" xreflabel="Data Races"> +<title>Detected errors: Data Races</title> + +<para>A data race happens, or could happen, when two threads access a +shared memory location without using suitable locks or other +synchronisation to ensure single-threaded access. Such missing +locking can cause obscure timing dependent bugs. Ensuring programs +are race-free is one of the central difficulties of threaded +programming.</para> + +<para>Reliably detecting races is a difficult problem, and most +of Helgrind's internals are devoted to do dealing with it. +We begin with a simple example.</para> + + +<sect2 id="hg-manual.data-races.example" xreflabel="Simple Race"> +<title>A Simple Data Race</title> + +<para>About the simplest possible example of a race is as follows. In +this program, it is impossible to know what the value +of <computeroutput>var</computeroutput> is at the end of the program. +Is it 2 ? Or 1 ?</para> + +<programlisting><![CDATA[ +#include <pthread.h> + +int var = 0; + +void* child_fn ( void* arg ) { + var++; /* Unprotected relative to parent */ /* this is line 6 */ + return NULL; +} + +int main ( void ) { + pthread_t child; + pthread_create(&child, NULL, child_fn, NULL); + var++; /* Unprotected relative to child */ /* this is line 13 */ + pthread_join(child, NULL); + return 0; +} +]]></programlisting> + +<para>The problem is there is nothing to +stop <computeroutput>var</computeroutput> being updated simultaneously +by both threads. A correct program would +protect <computeroutput>var</computeroutput> with a lock of type +<computeroutput>pthread_mutex_t</computeroutput>, which is acquired +before each access and released afterwards. Helgrind's output for +this program is:</para> + +<programlisting><![CDATA[ +Thread #1 is the program's root thread + +Thread #2 was created + at 0x511C08E: clone (in /lib64/libc-2.8.so) + by 0x4E333A4: do_clone (in /lib64/libpthread-2.8.so) + by 0x4E33A30: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.8.so) + by 0x4C299D4: pthread_create@* (hg_intercepts.c:214) + by 0x400605: main (simple_race.c:12) + +Possible data race during read of size 4 at 0x601038 by thread #1 + at 0x400606: main (simple_race.c:13) + This conflicts with a previous write of size 4 by thread #2 + at 0x4005DC: child_fn (simple_race.c:6) + by 0x4C29AFF: mythread_wrapper (hg_intercepts.c:194) + by 0x4E3403F: start_thread (in /lib64/libpthread-2.8.so) + by 0x511C0CC: clone (in /lib64/libc-2.8.so) + Location 0x601038 is 0 bytes inside global var "var" + declared at simple_race.c:3 +]]></programlisting> + +<para>This is quite a lot of detail for an apparently simple error. +The last clause is the main error message. It says there is a race as +a result of a read of size 4 (bytes), at 0x601038, which is the +address of <computeroutput>var</computeroutput>, happening in +function <computeroutput>main</computeroutput> at line 13 in the +program.</para> + +<para>Two important parts of the message are:</para> + +<itemizedlist> + <listitem> + <para>Helgrind shows two stack traces for the error, not one. By + definition, a race involves two different threads accessing the + same location in such a way that the result depends on the relative + speeds of the two threads.</para> + <para> + The first stack trace follows the text "<computeroutput>Possible + data race during read of size 4 ...</computeroutput>" and the + second trace follows the text "<computeroutput>This conflicts with + a previous write of size 4 ...</computeroutput>". Helgrind is + usually able to show both accesses involved in a race. At least + one of these will be a write (since two concurrent, unsynchronised + reads are harmless), and they will of course be from different + threads.</para> + <para>By examining your program at the two locations, you should be + able to get at least some idea of what the root cause of the + problem is.</para> + </listitem> + <listitem> + <para>For races which occur on global or stack variables, Helgrind + tries to identify the name and defining point of the variable. + Hence the text "<computeroutput>Location 0x601038 is 0 bytes inside + global var "var" declared at simple_race.c:3</computeroutput>".</para> + <para>Showing names of stack and global variables carries no + run-time overhead once Helgrind has your program up and running. + However, it does require Helgrind to spend considerable extra time + and memory at program startup to read the relevant debug info. + Hence this facility is disabled by default. To enable it, you need + to give the <varname>--read-var-info=yes</varname> flag to + Helgrind.</para> + </listitem> +</itemizedlist> + +<para>The following section explains Helgrind's race detection +algorithm in more detail.</para> + +</sect2> + + + +<sect2 id="hg-manual.data-races.algorithm" xreflabel="DR Algorithm"> +<title>Helgrind's Race Detection Algorithm</title> + +<para>Most programmers think about threaded programming in terms of +the basic functionality provided by the threading library (POSIX +Pthreads): thread creation, thread joining, locks, condition +variables, semaphores and barriers.</para> + +<para>The effect of using these functions is to impose on a threaded +program, constraints upon the order in which memory accesses can +happen. This implied ordering is generally known as the +"happens-before relation". Once you understand the happens-before +relation, it is easy to see how Helgrind finds races in your code. +Fortunately, the happens-before relation is itself easy to understand, +and is by itself a useful tool for reasoning about the behaviour of +parallel programs. We now introduce it using a simple example.</para> + +<para>Consider first the following buggy program:</para> + +<programlisting><![CDATA[ +Parent thread: Child thread: + +int var; + +// create child thread +pthread_create(...) +var = 20; var = 10; + exit + +// wait for child +pthread_join(...) +printf("%d\n", var); +]]></programlisting> + +<para>The parent thread creates a child. Both then write different +values to some variable <computeroutput>var</computeroutput>, and the +parent then waits for the child to exit.</para> + +<para>What is the value of <computeroutput>var</computeroutput> at the +end of the program, 10 or 20? We don't know. The program is +considered buggy (it has a race) because the final value +of <computeroutput>var</computeroutput> depends on the relative rates +of progress of the parent and child threads. If the parent is fast +and the child is slow, then the child's assignment may happen later, +so the final value will be 10; and vice versa if the child is faster +than the parent.</para> + +<para>The relative rates of progress of parent vs child is not something +the programmer can control, and will often change from run to run. +It depends on factors such as the load on the machine, what else is +running, the kernel's scheduling strategy, and many other factors.</para> + +<para>The obvious fix is to use a lock to +protect <computeroutput>var</computeroutput>. It is however +instructive to consider a somewhat more abstract solution, which is to +send a message from one thread to the other:</para> + +<programlisting><![CDATA[ +Parent thread: Child thread: + +int var; + +// create child thread +pthread_create(...) +var = 20; +// send message to child + // wait for message to arrive + var = 10; + exit + +// wait for child +pthread_join(...) +printf("%d\n", var); +]]></programlisting> + +<para>Now the program reliably prints "10", regardless of the speed of +the threads. Why? Because the child's assignment cannot happen until +after it receives the message. And the message is not sent until +after the parent's assignment is done.</para> + +<para>The message transmission creates a "happens-before" dependency +between the two assignments: <computeroutput>var = 20;</computeroutput> +must now happen-before <computeroutput>var = 10;</computeroutput>. +And so there is no longer a race +on <computeroutput>var</computeroutput>. +</para> + +<para>Note that it's not significant that the parent sends a message +to the child. Sending a message from the child (after its assignment) +to the parent (before its assignment) would also fix the problem, causing +the program to reliably print "20".</para> + +<para>Helgrind's algorithm is (conceptually) very simple. It monitors all +accesses to memory locations. If a location -- in this example, +<computeroutput>var</computeroutput>, +is accessed by two different threads, Helgrind checks to see if the +two accesses are ordered by the happens-before relation. If so, +that's fine; if not, it reports a race.</para> + +<para>It is important to understand the the happens-before relation +creates only a partial ordering, not a total ordering. An example of +a total ordering is comparison of numbers: for any two numbers +<computeroutput>x</computeroutput> and +<computeroutput>y</computeroutput>, either +<computeroutput>x</computeroutput> is less than, equal to, or greater +than +<computeroutput>y</computeroutput>. A partial ordering is like a +total ordering, but it can also express the concept that two elements +are neither equal, less or greater, but merely unordered with respect +to each other.</para> + +<para>In the fixed example above, we say that +<computeroutput>var = 20;</computeroutput> "happens-before" +<computeroutput>var = 10;</computeroutput>. But in the original +version, they are unordered: we cannot say that either happens-before +the other.</para> + +<para>What does it mean to say that two accesses from different +threads are ordered by the happens-before relation? It means that +there is some chain of inter-thread synchronisation operations which +cause those accesses to happen in a particular order, irrespective of +the actual rates of progress of the individual threads. This is a +required property for a reliable threaded program, which is why +Helgrind checks for it.</para> + +<para>The happens-before relations created by standard threading +primitives are as follows:</para> + +<itemizedlist> + <listitem><para>When a mutex is unlocked by thread T1 and later (or + immediately) locked by thread T2, then the memory accesses in T1 + prior to the unlock must happen-before those in T2 after it acquires + the lock.</para> + </listitem> + <listitem><para>The same idea applies to reader-writer locks, + although with some complication so as to allow correct handling of + reads vs writes.</para> + </listitem> + <listitem><para>When a condition variable (CV) is signalled on by + thread T1 and some other thread T2 is thereby released from a wait + on the same CV, then the memory accesses in T1 prior to the + signalling must happen-before those in T2 after it returns from the + wait. If no thread was waiting on the CV then there is no + effect.</para> + </listitem> + <listitem><para>If instead T1 broadcasts on a CV, then all of the + waiting threads, rather than just one of them, acquire a + happens-before dependency on the broadcasting thread at the point it + did the broadcast.</para> + </listitem> + <listitem><para>A thread T2 that continues after completing sem_wait + on a semaphore that thread T1 posts on, acquires a happens-before + dependence on the posting thread, a bit like dependencies caused + mutex unlock-lock pairs. However, since a semaphore can be posted + on many times, it is unspecified from which of the post calls the + wait call gets its happens-before dependency.</para> + </listitem> + <listitem><para>For a group of threads T1 .. Tn which arrive at a + barrier and then move on, each thread after the call has a + happens-after dependency from all threads before the + barrier.</para> + </listitem> + <listitem><para>A newly-created child thread acquires an initial + happens-after dependency on the point where its parent created it. + That is, all memory accesses performed by the parent prior to + creating the child are regarded as happening-before all the accesses + of the child.</para> + </listitem> + <listitem><para>Similarly, when an exiting thread is reaped via a + call to pthread_join, once the call returns, the reaping thread + acquires a happens-after dependency relative to all memory accesses + made by the exiting thread.</para> + </listitem> +</itemizedlist> + +<para>In summary: Helgrind intercepts the above listed events, and builds a +directed acyclic graph represented the collective happens-before +dependencies. It also monitors all memory accesses.</para> + +<para>If a location is accessed by two different threads, but Helgrind +cannot find any path through the happens-before graph from one access +to the other, then it reports a race.</para> + +<para>There are a couple of caveats:</para> + +<itemizedlist> + <listitem><para>Helgrind doesn't check for a race in the case where + both accesses are reads. That would be silly, since concurrent + reads are harmless.</para> + </listitem> + <listitem><para>Two accesses are considered to be ordered by the + happens-before dependency even through arbitrarily long chains of + synchronisation events. For example, if T1 accesses some location + L, and then pthread_cond_signals T2, which later + pthread_cond_signals T3, which then accesses L, then a suitable + happens-before dependency exists between the first and second + accesses, even though it involves two different inter-thread + synchronisation events.</para> + </listitem> +</itemizedlist> + +</sect2> + + + +<sect2 id="hg-manual.data-races.errmsgs" xreflabel="Race Error Messages"> +<title>Interpreting Race Error Messages</title> + +<para>Helgrind's race detection algorithm collects a lot of +information, and tries to present it in a helpful way when a race is +detected. Here's an example:</para> + +<programlisting><![CDATA[ +Thread #2 was created + at 0x511C08E: clone (in /lib64/libc-2.8.so) + by 0x4E333A4: do_clone (in /lib64/libpthread-2.8.so) + by 0x4E33A30: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.8.so) + by 0x4C299D4: pthread_create@* (hg_intercepts.c:214) + by 0x4008F2: main (tc21_pthonce.c:86) + +Thread #3 was created + at 0x511C08E: clone (in /lib64/libc-2.8.so) + by 0x4E333A4: do_clone (in /lib64/libpthread-2.8.so) + by 0x4E33A30: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.8.so) + by 0x4C299D4: pthread_create@* (hg_intercepts.c:214) + by 0x4008F2: main (tc21_pthonce.c:86) + +Possible data race during read of size 4 at 0x601070 by thread #3 + at 0x40087A: child (tc21_pthonce.c:74) + by 0x4C29AFF: mythread_wrapper (hg_intercepts.c:194) + by 0x4E3403F: start_thread (in /lib64/libpthread-2.8.so) + by 0x511C0CC: clone (in /lib64/libc-2.8.so) + This conflicts with a previous write of size 4 by thread #2 + at 0x400883: child (tc21_pthonce.c:74) + by 0x4C29AFF: mythread_wrapper (hg_intercepts.c:194) + by 0x4E3403F: start_thread (in /lib64/libpthread-2.8.so) + by 0x511C0CC: clone (in /lib64/libc-2.8.so) + Location 0x601070 is 0 bytes inside local var "unprotected2" + declared at tc21_pthonce.c:51, in frame #0 of thread 3 +]]></programlisting> + +<para>Helgrind first announces the creation points of any threads +referenced in the error message. This is so it can speak concisely +about threads without repeatedly printing their creation point call +stacks. Each thread is only ever announced once, the first time it +appears in any Helgrind error message.</para> + +<para>The main error message begins at the text +"<computeroutput>Possible data race during read</computeroutput>". At +the start is information you would expect to see -- address and size +of the racing access, whether a read or a write, and the call stack at +the point it was detected.</para> + +<para>A second call stack is presented starting at the text +"<computeroutput>This conflicts with a previous +write</computeroutput>". This shows a previous access which also +accessed the stated address, and which is believed to be racing +against the access in the first call stack.</para> + +<para>Finally, Helgrind may attempt to give a description of the +raced-on address in source level terms. In this example, it +identifies it as a local variable, shows its name, declaration point, +and in which frame (of the first call stack) it lives. Note that this +information is only shown when <varname>--read-var-info=yes</varname> +is specified on the command line. That's because reading the DWARF3 +debug information in enough detail to capture variable type and +location information makes Helgrind much slower at startup, and also +requires considerable amounts of memory, for large programs. +</para> + +<para>Once you have your two call stacks, how do you find the root +cause of the race?</para> + +<para>The first thing to do is examine the source locations referred +to by each call stack. They should both show an access to the same +location, or variable.</para> + +<para>Now figure out how how that location should have been made +thread-safe:</para> + +<itemizedlist> + <listitem><para>Perhaps the location was intended to be protected by + a mutex? If so, you need to lock and unlock the mutex at both + access points, even if one of the accesses is reported to be a read. + Did you perhaps forget the locking at one or other of the + accesses?</para> + </listitem> + <listitem><para>Alternatively, perhaps you intended to use a some + other scheme to make it safe, such as signalling on a condition + variable. In all such cases, try to find a synchronisation event + (or a chain thereof) which separates the earlier-observed access (as + shown in the second call stack) from the later-observed access (as + shown in the first call stack). In other words, try to find + evidence that the earlier access "happens-before" the later access. + See the previous subsection for an explanation of the happens-before + relation.</para> + <para> + The fact that Helgrind is reporting a race means it did not observe + any happens-before relation between the two accesses. If + Helgrind is working correctly, it should also be the case that you + also cannot find any such relation, even on detailed inspection + of the source code. Hopefully, though, your inspection of the code + will show where the missing synchronisation operation(s) should have + been.</para> + </listitem> +</itemizedlist> + +</sect2> + + +</sect1> + +<sect1 id="hg-manual.effective-use" xreflabel="Helgrind Effective Use"> +<title>Hints and Tips for Effective Use of Helgrind</title> + +<para>Helgrind can be very helpful in finding and resolving +threading-related problems. Like all sophisticated tools, it is most +effective when you understand how to play to its strengths.</para> + +<para>Helgrind will be less effective when you merely throw an +existing threaded program at it and try to make sense of any reported +errors. It will be more effective if you design threaded programs +from the start in a way that helps Helgrind verify correctness. The +same is true for finding memory errors with Memcheck, but applies more +here, because thread checking is a harder problem. Consequently it is +much easier to write a correct program for which Helgrind falsely +reports (threading) errors than it is to write a correct program for +which Memcheck falsely reports (memory) errors.</para> + +<para>With that in mind, here are some tips, listed most important first, +for getting reliable results and avoiding false errors. The first two +are critical. Any violations of them will swamp you with huge numbers +of false data-race errors.</para> + + +<orderedlist> + + <listitem> + <para>Make sure your application, and all the libraries it uses, + use the POSIX threading primitives. Helgrind needs to be able to + see all events pertaining to thread creation, exit, locking and + other synchronisation events. To do so it intercepts many POSIX + pthread_ functions.</para> + + <para>Do not roll your own threading primitives (mutexes, etc) + from combinations of the Linux futex syscall, atomic counters and + wotnot. These throw Helgrind's internal what's-going-on models + way off course and will give bogus results.</para> + + <para>Also, do not reimplement existing POSIX abstractions using + other POSIX abstractions. For example, don't build your own + semaphore routines or reader-writer locks from POSIX mutexes and + condition variables. Instead use POSIX reader-writer locks and + semaphores directly, since Helgrind supports them directly.</para> + + <para>Helgrind directly supports the following POSIX threading + abstractions: mutexes, reader-writer locks, condition variables + (but see below), semaphores and barriers. Currently spinlocks + are not supported, although they could be in future.</para> + + <para>At the time of writing, the following popular Linux packages + are known to implement their own threading primitives:</para> + + <itemizedlist> + <listitem><para>Qt version 4.X. Qt 3.X is harmless in that it + only uses POSIX pthreads primitives. Unfortunately Qt 4.X + has its own implementation of mutexes (QMutex) and thread reaping. + Helgrind 3.4.x contains direct support + for Qt 4.X threading, which is experimental but is believed to + work fairly well. A side effect of supporting Qt 4 directly is + that Helgrind can be used to debug KDE4 applications. As this + is an experimental feature, we would particularly appreciate + feedback from folks who have used Helgrind to successfully debug + Qt 4 and/or KDE4 applications.</para> + </listitem> + <listitem><para>Runtime support library for GNU OpenMP (part of + GCC), at least GCC versions 4.2 and 4.3. The GNU OpenMP runtime + library (libgomp.so) constructs its own synchronisation + primitives using combinations of atomic memory instructions and + the futex syscall, which causes total chaos since in Helgrind + since it cannot "see" those.</para> + <para>Fortunately, this can be solved using a configuration-time + flag (for gcc). Rebuild gcc from source, and configure using + <varname>--disable-linux-futex</varname>. + This makes libgomp.so use the standard + POSIX threading primitives instead. Note that this was tested + using gcc-4.2.3 and has not been re-tested using more recent gcc + versions. We would appreciate hearing about any successes or + failures with more recent versions.</para> + </listitem> + </itemizedlist> + </listitem> + + <listitem> + <para>Avoid memory recycling. If you can't avoid it, you must use + tell Helgrind what is going on via the VALGRIND_HG_CLEAN_MEMORY + client request + (in <computeroutput>helgrind.h</computeroutput>).</para> + + <para>Helgrind is aware of standard memory allocation and + deallocation that occurs via malloc/free/new/delete and from entry + and exit of stack frames. In particular, when memory is + deallocated via free, delete, or function exit, Helgrind considers + that memory clean, so when it is eventually reallocated, its + history is irrelevant.</para> + + <para>However, it is common practice to implement memory recycling + schemes. In these, memory to be freed is not handed to + malloc/delete, but instead put into a pool of free buffers to be + handed out again as required. The problem is that Helgrind has no + way to know that such memory is logically no longer in use, and + its history is irrelevant. Hence you must make that explicit, + using the VALGRIND_HG_CLEAN_MEMORY client request to specify the + relevant address ranges. It's easiest to put these requests into + the pool manager code, and use them either when memory is returned + to the pool, or is allocated from it.</para> + </listitem> + + <listitem> + <para>Avoid POSIX condition variables. If you can, use POSIX + semaphores (sem_t, sem_post, sem_wait) to do inter-thread event + signalling. Semaphores with an initial value of zero are + particularly useful for this.</para> + + <para>Helgrind only partially correctly handles POSIX condition + variables. This is because Helgrind can see inter-thread + dependencies between a pthread_cond_wait call and a + pthread_cond_signal/broadcast call only if the waiting thread + actually gets to the rendezvous first (so that it actually calls + pthread_cond_wait). It can't see dependencies between the threads + if the signaller arrives first. In the latter case, POSIX + guidelines imply that the associated boolean condition still + provides an inter-thread synchronisation event, but one which is + invisible to Helgrind.</para> + + <para>The result of Helgrind missing some inter-thread + synchronisation events is to cause it to report false positives. + </para> + + <para>The root cause of this synchronisation lossage is + particularly hard to understand, so an example is helpful. It was + discussed at length by Arndt Muehlenfeld ("Runtime Race Detection + in Multi-Threaded Programs", Dissertation, TU Graz, Austria). The + canonical POSIX-recommended usage scheme for condition variables + is as follows:</para> + +<programlisting><![CDATA[ +b is a Boolean condition, which is False most of the time +cv is a condition variable +mx is its associated mutex + +Signaller: Waiter: + +lock(mx) lock(mx) +b = True while (b == False) +signal(cv) wait(cv,mx) +unlock(mx) unlock(mx) +]]></programlisting> + + <para>Assume <computeroutput>b</computeroutput> is False most of + the time. If the waiter arrives at the rendezvous first, it + enters its while-loop, waits for the signaller to signal, and + eventually proceeds. Helgrind sees the signal, notes the + dependency, and all is well.</para> + + <para>If the signaller arrives + first, <computeroutput>b</computeroutput> is set to true, and the + signal disappears into nowhere. When the waiter later arrives, it + does not enter its while-loop and simply carries on. But even in + this case, the waiter code following the while-loop cannot execute + until the signaller sets <computeroutput>b</computeroutput> to + True. Hence there is still the same inter-thread dependency, but + this time it is through an arbitrary in-memory condition, and + Helgrind cannot see it.</para> + + <para>By comparison, Helgrind's detection of inter-thread + dependencies caused by semaphore operations is believed to be + exactly correct.</para> + + <para>As far as I know, a solution to this problem that does not + require source-level annotation of condition-variable wait loops + is beyond the current state of the art.</para> + </listitem> + + <listitem> + <para>Make sure you are using a supported Linux distribution. At + present, Helgrind only properly supports glibc-2.3 or later. This + in turn means we only support glibc's NPTL threading + implementation. The old LinuxThreads implementation is not + supported.</para> + </listitem> + + <listitem> + <para>Round up all finished threads using pthread_join. Avoid + detaching threads: don't create threads in the detached state, and + don't call pthread_detach on existing threads.</para> + + <para>Using pthread_join to round up finished threads provides a + clear synchronisation point that both Helgrind and programmers can + see. If you don't call pthread_join on a thread, Helgrind has no + way to know when it finishes, relative to any significant + synchronisation points for other threads in the program. So it + assumes that the thread lingers indefinitely and can potentially + interfere indefinitely with the memory state of the program. It + has every right to assume that -- after all, it might really be + the case that, for scheduling reasons, the exiting thread did run + very slowly in the last stages of its life.</para> + </listitem> + + <listitem> + <para>Perform thread debugging (with Helgrind) and memory + debugging (with Memcheck) together.</para> + + <para>Helgrind tracks the state of memory in detail, and memory + management bugs in the application are liable to cause confusion. + In extreme cases, applications which do many invalid reads and + writes (particularly to freed memory) have been known to crash + Helgrind. So, ideally, you should make your application + Memcheck-clean before using Helgrind.</para> + + <para>It may be impossible to make your application Memcheck-clean + unless you first remove threading bugs. In particular, it may be + difficult to remove all reads and writes to freed memory in + multithreaded C++ destructor sequences at program termination. + So, ideally, you should make your application Helgrind-clean + before using Memcheck.</para> + + <para>Since this circularity is obviously unresolvable, at least + bear in mind that Memcheck and Helgrind are to some extent + complementary, and you may need to use them together.</para> + </listitem> + + <listitem> + <para>POSIX requires that implementations of standard I/O (printf, + fprintf, fwrite, fread, etc) are thread safe. Unfortunately GNU + libc implements this by using internal locking primitives that + Helgrind is unable to intercept. Consequently Helgrind generates + many false race reports when you use these functions.</para> + + <para>Helgrind attempts to hide these errors using the standard + Valgrind error-suppression mechanism. So, at least for simple + test cases, you don't see any. Nevertheless, some may slip + through. Just something to be aware of.</para> + </listitem> + + <listitem> + <para>Helgrind's error checks do not work properly inside the + system threading library itself + (<computeroutput>libpthread.so</computeroutput>), and it usually + observes large numbers of (false) errors in there. Valgrind's + suppression system then filters these out, so you should not see + them.</para> + + <para>If you see any race errors reported + where <computeroutput>libpthread.so</computeroutput> or + <computeroutput>ld.so</computeroutput> is the object associated + with the innermost stack frame, please file a bug report at + http://www.valgrind.org.</para> + </listitem> + +</orderedlist> + +</sect1> + + + + +<sect1 id="hg-manual.options" xreflabel="Helgrind Options"> +<title>Helgrind Options</title> + +<para>The following end-user options are available:</para> + +<!-- start of xi:include in the manpage --> +<variablelist id="hg.opts.list"> + + <varlistentry id="opt.track-lockorders" + xreflabel="--track-lockorders"> + <term> + <option><![CDATA[--track-lockorders=no|yes + [default: yes] ]]></option> + </term> + <listitem> + <para>When enabled (the default), Helgrind performs lock order + consistency checking. For some buggy programs, the large number + of lock order errors reported can become annoying, particularly + if you're only interested in race errors. You may therefore find + it helpful to disable lock order checking.</para> + </listitem> + </varlistentry> + + <varlistentry id="opt.show-conflicts" + xreflabel="--show-conflicts"> + <term> + <option><![CDATA[--show-conflicts=no|yes + [default: yes] ]]></option> + </term> + <listitem> + <para>When enabled (the default), Helgrind collects enough + information about "old" accesses that it can produce two stack + traces in a race report -- both the stack trace for the + current access, and the trace for the older, conflicting + access.</para> + <para>Collecting such information is expensive in both speed and + memory. This flag disables collection of such information. + Helgrind will run significantly faster and use less memory, + but without the conflicting access stacks, it will be very + much more difficult to track down the root causes of + races. However, this option may be useful in situations where + you just want to check for the presence or absence of races, + for example, when doing regression testing of a previously + race-free program.</para> + </listitem> + </varlistentry> + + <varlistentry id="opt.conflict-cache-size" + xreflabel="--conflict-cache-size"> + <term> + <option><![CDATA[--conflict-cache-size=N + [default: 1000000] ]]></option> + </term> + <listitem> + <para>Information about "old" conflicting accesses is stored in + a cache of limited size, with LRU-style management. This is + necessary because it isn't practical to store a stack trace + for every single memory access made by the program. + Historical information on not recently accessed locations is + periodically discarded, to free up space in the cache.</para> + <para>This flag controls the size of the cache, in terms of the + number of different memory addresses for which + conflicting access information is stored. If you find that + Helgrind is showing race errors with only one stack instead of + the expected two stacks, try increasing this value.</para> + <para>The minimum value is 10,000 and the maximum is 10,000,000 + (ten times the default value). Increasing the value by 1 + increases Helgrind's memory requirement by very roughly 100 + bytes, so the maximum value will easily eat up an extra + gigabyte or so of memory.</para> + </listitem> + </varlistentry> + +</variablelist> +<!-- end of xi:include in the manpage --> + +<!-- start of xi:include in the manpage --> +<para>In addition, the following debugging options are available for +Helgrind:</para> + +<variablelist id="hg.debugopts.list"> + + <varlistentry id="opt.trace-malloc" xreflabel="--trace-malloc"> + <term> + <option><![CDATA[--trace-malloc=no|yes [no] + ]]></option> + </term> + <listitem> + <para>Show all client malloc (etc) and free (etc) requests.</para> + </listitem> + </varlistentry> + + <varlistentry id="opt.cmp-race-err-addrs" + xreflabel="--cmp-race-err-addrs"> + <term> + <option><![CDATA[--cmp-race-err-addrs=no|yes [no] + ]]></option> + </term> + <listitem> + <para>Controls whether or not race (data) addresses should be + taken into account when removing duplicates of race errors. + With <varname>--cmp-race-err-addrs=no</varname>, two otherwise + identical race errors will be considered to be the same if + their race addresses differ. With + With <varname>--cmp-race-err-addrs=yes</varname> they will be + considered different. This is provided to help make certain + regression tests work reliably.</para> + </listitem> + </varlistentry> + + <varlistentry id="opt.hg-sanity-flags" xreflabel="--hg-sanity-flags"> + <term> + <option><![CDATA[--hg-sanity-flags=<XXXXXX> (X = 0|1) [000000] + ]]></option> + </term> + <listitem> + <para>Run extensive sanity checks on Helgrind's internal + data structures at events defined by the bitstring, as + follows:</para> + <para><computeroutput>010000 </computeroutput>after changes to + the lock order acquisition graph</para> + <para><computeroutput>001000 </computeroutput>after every client + memory access (NB: not currently used)</para> + <para><computeroutput>000100 </computeroutput>after every client + memory range permission setting of 256 bytes or greater</para> + <para><computeroutput>000010 </computeroutput>after every client + lock or unlock event</para> + <para><computeroutput>000001 </computeroutput>after every client + thread creation or joinage event</para> + <para>Note these will make Helgrind run very slowly, often to + the point of being completely unusable.</para> + </listitem> + </varlistentry> + +</variablelist> +<!-- end of xi:include in the manpage --> + + +</sect1> + +<sect1 id="hg-manual.todolist" xreflabel="To Do List"> +<title>A To-Do List for Helgrind</title> + +<para>The following is a list of loose ends which should be tidied up +some time.</para> + +<itemizedlist> + <listitem><para>Track which mutexes are associated with which + condition variables, and emit a warning if this becomes + inconsistent.</para> + </listitem> + <listitem><para>For lock order errors, print the complete lock + cycle, rather than only doing for size-2 cycles as at + present.</para> + </listitem> + <listitem><para>Document the VALGRIND_HG_CLEAN_MEMORY client + request.</para> + </listitem> + <listitem><para>The conflicting access mechanism sometimes + mysteriously fails to show the conflicting access' stack, even + when provided with unbounded storage for conflicting access info. + This should be investigated.</para> + </listitem> + <listitem><para>Document races caused by gcc's thread-unsafe code + generation for speculative stores. In the interim see + <computeroutput>http://gcc.gnu.org/ml/gcc/2007-10/msg00266.html + </computeroutput> + and <computeroutput>http://lkml.org/lkml/2007/10/24/673</computeroutput>. + </para> + </listitem> + <listitem><para>Don't update the lock-order graph, and don't check + for errors, when a "try"-style lock operation happens (eg + pthread_mutex_trylock). Such calls do not add any real + restrictions to the locking order, since they can always fail to + acquire the lock, resulting in the caller going off and doing Plan + B (presumably it will have a Plan B). Doing such checks could + generate false lock-order errors and confuse users.</para> + </listitem> + <listitem><para> Performance can be very poor. Slowdowns on the + order of 100:1 are not unusual. There is limited scope for + performance improvements. + </para> + </listitem> + +</itemizedlist> + +</sect1> + +</chapter> diff --git a/helgrind/docs/Makefile b/helgrind/docs/Makefile new file mode 100644 index 0000000..4a6b46a --- /dev/null +++ b/helgrind/docs/Makefile @@ -0,0 +1,341 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# helgrind/docs/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +pkgdatadir = $(datadir)/valgrind +pkglibdir = $(libdir)/valgrind +pkgincludedir = $(includedir)/valgrind +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +subdir = helgrind/docs +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/steph/compile/valgrind/missing --run aclocal-1.10 +AMTAR = ${SHELL} /home/steph/compile/valgrind/missing --run tar +AR = /usr/bin/ar +AUTOCONF = ${SHELL} /home/steph/compile/valgrind/missing --run autoconf +AUTOHEADER = ${SHELL} /home/steph/compile/valgrind/missing --run autoheader +AUTOMAKE = ${SHELL} /home/steph/compile/valgrind/missing --run automake-1.10 +AWK = gawk +BOOST_CFLAGS = +BOOST_LIBS = -lboost_thread-mt -m64 +CC = gcc +CCAS = gcc +CCASDEPMODE = depmode=gcc3 +CCASFLAGS = -Wno-long-long +CCDEPMODE = depmode=gcc3 +CFLAGS = -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector +CPP = gcc -E +CPPFLAGS = +CXX = g++ +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DEFAULT_SUPP = exp-ptrcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DIFF = diff -u +DISTCHECK_CONFIGURE_FLAGS = --with-vex=$(top_srcdir)/VEX +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +FLAG_FNO_STACK_PROTECTOR = -fno-stack-protector +FLAG_M32 = -m32 +FLAG_M64 = -m64 +FLAG_MAIX32 = +FLAG_MAIX64 = +FLAG_MMMX = -mmmx +FLAG_MSSE = -msse +FLAG_UNLIMITED_INLINE_UNIT_GROWTH = --param inline-unit-growth=900 +FLAG_WDECL_AFTER_STMT = -Wdeclaration-after-statement +FLAG_W_EXTRA = -Wextra +FLAG_W_NO_FORMAT_ZERO_LENGTH = -Wno-format-zero-length +GDB = /usr/bin/gdb +GLIBC_VERSION = 2.8 +GREP = /bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LDFLAGS = +LIBOBJS = +LIBS = +LN_S = ln -s +LTLIBOBJS = +MAINT = # +MAKEINFO = ${SHELL} /home/steph/compile/valgrind/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +MPI_CC = mpicc +OBJEXT = o +PACKAGE = valgrind +PACKAGE_BUGREPORT = valgrind-users@lists.sourceforge.net +PACKAGE_NAME = Valgrind +PACKAGE_STRING = Valgrind 3.5.0.SVN +PACKAGE_TARNAME = valgrind +PACKAGE_VERSION = 3.5.0.SVN +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PKG_CONFIG = /usr/bin/pkg-config +PREFERRED_STACK_BOUNDARY = +QTCORE_CFLAGS = -DQT_SHARED -I/usr/include/QtCore +QTCORE_LIBS = -lQtCore +RANLIB = ranlib +SET_MAKE = +SHELL = /bin/sh +STRIP = +VALT_LOAD_ADDRESS = 0x38000000 +VERSION = 3.5.0.SVN +VEX_DIR = $(top_srcdir)/VEX +VGCONF_ARCH_PRI = amd64 +VGCONF_OS = linux +VGCONF_PLATFORM_PRI_CAPS = AMD64_LINUX +VGCONF_PLATFORM_SEC_CAPS = +abs_builddir = /home/steph/compile/valgrind/helgrind/docs +abs_srcdir = /home/steph/compile/valgrind/helgrind/docs +abs_top_builddir = /home/steph/compile/valgrind +abs_top_srcdir = /home/steph/compile/valgrind +ac_ct_CC = gcc +ac_ct_CXX = g++ +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /home/steph/compile/valgrind/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_builddir = ../.. +top_srcdir = ../.. +EXTRA_DIST = hg-manual.xml +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign helgrind/docs/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign helgrind/docs/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/helgrind/docs/Makefile.am b/helgrind/docs/Makefile.am new file mode 100644 index 0000000..84f630f --- /dev/null +++ b/helgrind/docs/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = hg-manual.xml diff --git a/helgrind/docs/Makefile.in b/helgrind/docs/Makefile.in new file mode 100644 index 0000000..4c97b37 --- /dev/null +++ b/helgrind/docs/Makefile.in @@ -0,0 +1,341 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = helgrind/docs +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFAULT_SUPP = @DEFAULT_SUPP@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIFF = @DIFF@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FLAG_FNO_STACK_PROTECTOR = @FLAG_FNO_STACK_PROTECTOR@ +FLAG_M32 = @FLAG_M32@ +FLAG_M64 = @FLAG_M64@ +FLAG_MAIX32 = @FLAG_MAIX32@ +FLAG_MAIX64 = @FLAG_MAIX64@ +FLAG_MMMX = @FLAG_MMMX@ +FLAG_MSSE = @FLAG_MSSE@ +FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ +FLAG_WDECL_AFTER_STMT = @FLAG_WDECL_AFTER_STMT@ +FLAG_W_EXTRA = @FLAG_W_EXTRA@ +FLAG_W_NO_FORMAT_ZERO_LENGTH = @FLAG_W_NO_FORMAT_ZERO_LENGTH@ +GDB = @GDB@ +GLIBC_VERSION = @GLIBC_VERSION@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MPI_CC = @MPI_CC@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PREFERRED_STACK_BOUNDARY = @PREFERRED_STACK_BOUNDARY@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VALT_LOAD_ADDRESS = @VALT_LOAD_ADDRESS@ +VERSION = @VERSION@ +VEX_DIR = @VEX_DIR@ +VGCONF_ARCH_PRI = @VGCONF_ARCH_PRI@ +VGCONF_OS = @VGCONF_OS@ +VGCONF_PLATFORM_PRI_CAPS = @VGCONF_PLATFORM_PRI_CAPS@ +VGCONF_PLATFORM_SEC_CAPS = @VGCONF_PLATFORM_SEC_CAPS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = hg-manual.xml +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign helgrind/docs/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign helgrind/docs/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/helgrind/docs/hg-manual.xml b/helgrind/docs/hg-manual.xml new file mode 100644 index 0000000..2a0348f --- /dev/null +++ b/helgrind/docs/hg-manual.xml @@ -0,0 +1,1121 @@ +<?xml version="1.0"?> <!-- -*- sgml -*- --> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" +[ <!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities; ]> + + +<chapter id="hg-manual" xreflabel="Helgrind: thread error detector"> + <title>Helgrind: a thread error detector</title> + +<para>To use this tool, you must specify +<computeroutput>--tool=helgrind</computeroutput> on the Valgrind +command line.</para> + + + + +<sect1 id="hg-manual.overview" xreflabel="Overview"> +<title>Overview</title> + +<para>Helgrind is a Valgrind tool for detecting synchronisation errors +in C, C++ and Fortran programs that use the POSIX pthreads +threading primitives.</para> + +<para>The main abstractions in POSIX pthreads are: a set of threads +sharing a common address space, thread creation, thread joining, +thread exit, mutexes (locks), condition variables (inter-thread event +notifications), reader-writer locks, semaphores and barriers.</para> + +<para>Helgrind is aware of all these abstractions and tracks their +effects as accurately as it can. Currently it does not correctly +handle pthread spinlocks, although it will not object if you use them. +Adding support for spinlocks would be easy enough if the demand arises. +On x86 and amd64 platforms, it understands and partially handles +implicit locking arising from the use of the LOCK instruction prefix. +</para> + +<para>Helgrind can detect three classes of errors, which are discussed +in detail in the next three sections:</para> + +<orderedlist> + <listitem> + <para><link linkend="hg-manual.api-checks"> + Misuses of the POSIX pthreads API.</link></para> + </listitem> + <listitem> + <para><link linkend="hg-manual.lock-orders"> + Potential deadlocks arising from lock + ordering problems.</link></para> + </listitem> + <listitem> + <para><link linkend="hg-manual.data-races"> + Data races -- accessing memory without adequate locking + or synchronisation</link>. + Note that race detection in versions 3.4.0 and later uses a + different algorithm than in 3.3.x. Hence, if you have been using + Helgrind in 3.3.x, you may want to re-read this section. + </para> + </listitem> +</orderedlist> + +<para>Following those is a section containing +<link linkend="hg-manual.effective-use"> +hints and tips on how to get the best out of Helgrind.</link> +</para> + +<para>Then there is a +<link linkend="hg-manual.options">summary of command-line +options.</link> +</para> + +<para>Finally, there is +<link linkend="hg-manual.todolist">a brief summary of areas in which Helgrind +could be improved.</link> +</para> + +</sect1> + + + + +<sect1 id="hg-manual.api-checks" xreflabel="API Checks"> +<title>Detected errors: Misuses of the POSIX pthreads API</title> + +<para>Helgrind intercepts calls to many POSIX pthreads functions, and +is therefore able to report on various common problems. Although +these are unglamourous errors, their presence can lead to undefined +program behaviour and hard-to-find bugs later on. The detected errors +are:</para> + +<itemizedlist> + <listitem><para>unlocking an invalid mutex</para></listitem> + <listitem><para>unlocking a not-locked mutex</para></listitem> + <listitem><para>unlocking a mutex held by a different + thread</para></listitem> + <listitem><para>destroying an invalid or a locked mutex</para></listitem> + <listitem><para>recursively locking a non-recursive mutex</para></listitem> + <listitem><para>deallocation of memory that contains a + locked mutex</para></listitem> + <listitem><para>passing mutex arguments to functions expecting + reader-writer lock arguments, and vice + versa</para></listitem> + <listitem><para>when a POSIX pthread function fails with an + error code that must be handled</para></listitem> + <listitem><para>when a thread exits whilst still holding locked + locks</para></listitem> + <listitem><para>calling <computeroutput>pthread_cond_wait</computeroutput> + with a not-locked mutex, an invalid mutex, + or one locked by a different + thread</para></listitem> + <listitem><para>invalid or duplicate initialisation of a pthread + barrier</para></listitem> + <listitem><para>initialisation of a pthread barrier on which threads + are still waiting</para></listitem> + <listitem><para>destruction of a pthread barrier object which was + never initialised, or on which threads are still + waiting</para></listitem> + <listitem><para>waiting on an uninitialised pthread + barrier</para></listitem> + <listitem><para>for all of the pthread_ functions that Helgrind + intercepts, an error is reported, along with a stack + trace, if the system threading library routine returns + an error code, even if Helgrind itself detected no + error</para></listitem> +</itemizedlist> + +<para>Checks pertaining to the validity of mutexes are generally also +performed for reader-writer locks.</para> + +<para>Various kinds of this-can't-possibly-happen events are also +reported. These usually indicate bugs in the system threading +library.</para> + +<para>Reported errors always contain a primary stack trace indicating +where the error was detected. They may also contain auxiliary stack +traces giving additional information. In particular, most errors +relating to mutexes will also tell you where that mutex first came to +Helgrind's attention (the "<computeroutput>was first observed +at</computeroutput>" part), so you have a chance of figuring out which +mutex it is referring to. For example:</para> + +<programlisting><![CDATA[ +Thread #1 unlocked a not-locked lock at 0x7FEFFFA90 + at 0x4C2408D: pthread_mutex_unlock (hg_intercepts.c:492) + by 0x40073A: nearly_main (tc09_bad_unlock.c:27) + by 0x40079B: main (tc09_bad_unlock.c:50) + Lock at 0x7FEFFFA90 was first observed + at 0x4C25D01: pthread_mutex_init (hg_intercepts.c:326) + by 0x40071F: nearly_main (tc09_bad_unlock.c:23) + by 0x40079B: main (tc09_bad_unlock.c:50) +]]></programlisting> + +<para>Helgrind has a way of summarising thread identities, as +you see here with the text "<computeroutput>Thread +#1</computeroutput>". This is so that it can speak about threads and +sets of threads without overwhelming you with details. See +<link linkend="hg-manual.data-races.errmsgs">below</link> +for more information on interpreting error messages.</para> + +</sect1> + + + + +<sect1 id="hg-manual.lock-orders" xreflabel="Lock Orders"> +<title>Detected errors: Inconsistent Lock Orderings</title> + +<para>In this section, and in general, to "acquire" a lock simply +means to lock that lock, and to "release" a lock means to unlock +it.</para> + +<para>Helgrind monitors the order in which threads acquire locks. +This allows it to detect potential deadlocks which could arise from +the formation of cycles of locks. Detecting such inconsistencies is +useful because, whilst actual deadlocks are fairly obvious, potential +deadlocks may never be discovered during testing and could later lead +to hard-to-diagnose in-service failures.</para> + +<para>The simplest example of such a problem is as +follows.</para> + +<itemizedlist> + <listitem><para>Imagine some shared resource R, which, for whatever + reason, is guarded by two locks, L1 and L2, which must both be held + when R is accessed.</para> + </listitem> + <listitem><para>Suppose a thread acquires L1, then L2, and proceeds + to access R. The implication of this is that all threads in the + program must acquire the two locks in the order first L1 then L2. + Not doing so risks deadlock.</para> + </listitem> + <listitem><para>The deadlock could happen if two threads -- call them + T1 and T2 -- both want to access R. Suppose T1 acquires L1 first, + and T2 acquires L2 first. Then T1 tries to acquire L2, and T2 tries + to acquire L1, but those locks are both already held. So T1 and T2 + become deadlocked.</para> + </listitem> +</itemizedlist> + +<para>Helgrind builds a directed graph indicating the order in which +locks have been acquired in the past. When a thread acquires a new +lock, the graph is updated, and then checked to see if it now contains +a cycle. The presence of a cycle indicates a potential deadlock involving +the locks in the cycle.</para> + +<para>In simple situations, where the cycle only contains two locks, +Helgrind will show where the required order was established:</para> + +<programlisting><![CDATA[ +Thread #1: lock order "0x7FEFFFAB0 before 0x7FEFFFA80" violated + at 0x4C23C91: pthread_mutex_lock (hg_intercepts.c:388) + by 0x40081F: main (tc13_laog1.c:24) + Required order was established by acquisition of lock at 0x7FEFFFAB0 + at 0x4C23C91: pthread_mutex_lock (hg_intercepts.c:388) + by 0x400748: main (tc13_laog1.c:17) + followed by a later acquisition of lock at 0x7FEFFFA80 + at 0x4C23C91: pthread_mutex_lock (hg_intercepts.c:388) + by 0x400773: main (tc13_laog1.c:18) +]]></programlisting> + +<para>When there are more than two locks in the cycle, the error is +equally serious. However, at present Helgrind does not show the locks +involved, so as to avoid flooding you with information. That could be +fixed in future. For example, here is a an example involving a cycle +of five locks from a naive implementation the famous Dining +Philosophers problem +(see <computeroutput>helgrind/tests/tc14_laog_dinphils.c</computeroutput>). +In this case Helgrind has detected that all 5 philosophers could +simultaneously pick up their left fork and then deadlock whilst +waiting to pick up their right forks.</para> + +<programlisting><![CDATA[ +Thread #6: lock order "0x6010C0 before 0x601160" violated + at 0x4C23C91: pthread_mutex_lock (hg_intercepts.c:388) + by 0x4007C0: dine (tc14_laog_dinphils.c:19) + by 0x4C25DF7: mythread_wrapper (hg_intercepts.c:178) + by 0x4E2F09D: start_thread (in /lib64/libpthread-2.5.so) + by 0x51054CC: clone (in /lib64/libc-2.5.so) +]]></programlisting> + +</sect1> + + + + +<sect1 id="hg-manual.data-races" xreflabel="Data Races"> +<title>Detected errors: Data Races</title> + +<para>A data race happens, or could happen, when two threads access a +shared memory location without using suitable locks or other +synchronisation to ensure single-threaded access. Such missing +locking can cause obscure timing dependent bugs. Ensuring programs +are race-free is one of the central difficulties of threaded +programming.</para> + +<para>Reliably detecting races is a difficult problem, and most +of Helgrind's internals are devoted to do dealing with it. +We begin with a simple example.</para> + + +<sect2 id="hg-manual.data-races.example" xreflabel="Simple Race"> +<title>A Simple Data Race</title> + +<para>About the simplest possible example of a race is as follows. In +this program, it is impossible to know what the value +of <computeroutput>var</computeroutput> is at the end of the program. +Is it 2 ? Or 1 ?</para> + +<programlisting><![CDATA[ +#include <pthread.h> + +int var = 0; + +void* child_fn ( void* arg ) { + var++; /* Unprotected relative to parent */ /* this is line 6 */ + return NULL; +} + +int main ( void ) { + pthread_t child; + pthread_create(&child, NULL, child_fn, NULL); + var++; /* Unprotected relative to child */ /* this is line 13 */ + pthread_join(child, NULL); + return 0; +} +]]></programlisting> + +<para>The problem is there is nothing to +stop <computeroutput>var</computeroutput> being updated simultaneously +by both threads. A correct program would +protect <computeroutput>var</computeroutput> with a lock of type +<computeroutput>pthread_mutex_t</computeroutput>, which is acquired +before each access and released afterwards. Helgrind's output for +this program is:</para> + +<programlisting><![CDATA[ +Thread #1 is the program's root thread + +Thread #2 was created + at 0x511C08E: clone (in /lib64/libc-2.8.so) + by 0x4E333A4: do_clone (in /lib64/libpthread-2.8.so) + by 0x4E33A30: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.8.so) + by 0x4C299D4: pthread_create@* (hg_intercepts.c:214) + by 0x400605: main (simple_race.c:12) + +Possible data race during read of size 4 at 0x601038 by thread #1 + at 0x400606: main (simple_race.c:13) + This conflicts with a previous write of size 4 by thread #2 + at 0x4005DC: child_fn (simple_race.c:6) + by 0x4C29AFF: mythread_wrapper (hg_intercepts.c:194) + by 0x4E3403F: start_thread (in /lib64/libpthread-2.8.so) + by 0x511C0CC: clone (in /lib64/libc-2.8.so) + Location 0x601038 is 0 bytes inside global var "var" + declared at simple_race.c:3 +]]></programlisting> + +<para>This is quite a lot of detail for an apparently simple error. +The last clause is the main error message. It says there is a race as +a result of a read of size 4 (bytes), at 0x601038, which is the +address of <computeroutput>var</computeroutput>, happening in +function <computeroutput>main</computeroutput> at line 13 in the +program.</para> + +<para>Two important parts of the message are:</para> + +<itemizedlist> + <listitem> + <para>Helgrind shows two stack traces for the error, not one. By + definition, a race involves two different threads accessing the + same location in such a way that the result depends on the relative + speeds of the two threads.</para> + <para> + The first stack trace follows the text "<computeroutput>Possible + data race during read of size 4 ...</computeroutput>" and the + second trace follows the text "<computeroutput>This conflicts with + a previous write of size 4 ...</computeroutput>". Helgrind is + usually able to show both accesses involved in a race. At least + one of these will be a write (since two concurrent, unsynchronised + reads are harmless), and they will of course be from different + threads.</para> + <para>By examining your program at the two locations, you should be + able to get at least some idea of what the root cause of the + problem is.</para> + </listitem> + <listitem> + <para>For races which occur on global or stack variables, Helgrind + tries to identify the name and defining point of the variable. + Hence the text "<computeroutput>Location 0x601038 is 0 bytes inside + global var "var" declared at simple_race.c:3</computeroutput>".</para> + <para>Showing names of stack and global variables carries no + run-time overhead once Helgrind has your program up and running. + However, it does require Helgrind to spend considerable extra time + and memory at program startup to read the relevant debug info. + Hence this facility is disabled by default. To enable it, you need + to give the <varname>--read-var-info=yes</varname> flag to + Helgrind.</para> + </listitem> +</itemizedlist> + +<para>The following section explains Helgrind's race detection +algorithm in more detail.</para> + +</sect2> + + + +<sect2 id="hg-manual.data-races.algorithm" xreflabel="DR Algorithm"> +<title>Helgrind's Race Detection Algorithm</title> + +<para>Most programmers think about threaded programming in terms of +the basic functionality provided by the threading library (POSIX +Pthreads): thread creation, thread joining, locks, condition +variables, semaphores and barriers.</para> + +<para>The effect of using these functions is to impose on a threaded +program, constraints upon the order in which memory accesses can +happen. This implied ordering is generally known as the +"happens-before relation". Once you understand the happens-before +relation, it is easy to see how Helgrind finds races in your code. +Fortunately, the happens-before relation is itself easy to understand, +and is by itself a useful tool for reasoning about the behaviour of +parallel programs. We now introduce it using a simple example.</para> + +<para>Consider first the following buggy program:</para> + +<programlisting><![CDATA[ +Parent thread: Child thread: + +int var; + +// create child thread +pthread_create(...) +var = 20; var = 10; + exit + +// wait for child +pthread_join(...) +printf("%d\n", var); +]]></programlisting> + +<para>The parent thread creates a child. Both then write different +values to some variable <computeroutput>var</computeroutput>, and the +parent then waits for the child to exit.</para> + +<para>What is the value of <computeroutput>var</computeroutput> at the +end of the program, 10 or 20? We don't know. The program is +considered buggy (it has a race) because the final value +of <computeroutput>var</computeroutput> depends on the relative rates +of progress of the parent and child threads. If the parent is fast +and the child is slow, then the child's assignment may happen later, +so the final value will be 10; and vice versa if the child is faster +than the parent.</para> + +<para>The relative rates of progress of parent vs child is not something +the programmer can control, and will often change from run to run. +It depends on factors such as the load on the machine, what else is +running, the kernel's scheduling strategy, and many other factors.</para> + +<para>The obvious fix is to use a lock to +protect <computeroutput>var</computeroutput>. It is however +instructive to consider a somewhat more abstract solution, which is to +send a message from one thread to the other:</para> + +<programlisting><![CDATA[ +Parent thread: Child thread: + +int var; + +// create child thread +pthread_create(...) +var = 20; +// send message to child + // wait for message to arrive + var = 10; + exit + +// wait for child +pthread_join(...) +printf("%d\n", var); +]]></programlisting> + +<para>Now the program reliably prints "10", regardless of the speed of +the threads. Why? Because the child's assignment cannot happen until +after it receives the message. And the message is not sent until +after the parent's assignment is done.</para> + +<para>The message transmission creates a "happens-before" dependency +between the two assignments: <computeroutput>var = 20;</computeroutput> +must now happen-before <computeroutput>var = 10;</computeroutput>. +And so there is no longer a race +on <computeroutput>var</computeroutput>. +</para> + +<para>Note that it's not significant that the parent sends a message +to the child. Sending a message from the child (after its assignment) +to the parent (before its assignment) would also fix the problem, causing +the program to reliably print "20".</para> + +<para>Helgrind's algorithm is (conceptually) very simple. It monitors all +accesses to memory locations. If a location -- in this example, +<computeroutput>var</computeroutput>, +is accessed by two different threads, Helgrind checks to see if the +two accesses are ordered by the happens-before relation. If so, +that's fine; if not, it reports a race.</para> + +<para>It is important to understand the the happens-before relation +creates only a partial ordering, not a total ordering. An example of +a total ordering is comparison of numbers: for any two numbers +<computeroutput>x</computeroutput> and +<computeroutput>y</computeroutput>, either +<computeroutput>x</computeroutput> is less than, equal to, or greater +than +<computeroutput>y</computeroutput>. A partial ordering is like a +total ordering, but it can also express the concept that two elements +are neither equal, less or greater, but merely unordered with respect +to each other.</para> + +<para>In the fixed example above, we say that +<computeroutput>var = 20;</computeroutput> "happens-before" +<computeroutput>var = 10;</computeroutput>. But in the original +version, they are unordered: we cannot say that either happens-before +the other.</para> + +<para>What does it mean to say that two accesses from different +threads are ordered by the happens-before relation? It means that +there is some chain of inter-thread synchronisation operations which +cause those accesses to happen in a particular order, irrespective of +the actual rates of progress of the individual threads. This is a +required property for a reliable threaded program, which is why +Helgrind checks for it.</para> + +<para>The happens-before relations created by standard threading +primitives are as follows:</para> + +<itemizedlist> + <listitem><para>When a mutex is unlocked by thread T1 and later (or + immediately) locked by thread T2, then the memory accesses in T1 + prior to the unlock must happen-before those in T2 after it acquires + the lock.</para> + </listitem> + <listitem><para>The same idea applies to reader-writer locks, + although with some complication so as to allow correct handling of + reads vs writes.</para> + </listitem> + <listitem><para>When a condition variable (CV) is signalled on by + thread T1 and some other thread T2 is thereby released from a wait + on the same CV, then the memory accesses in T1 prior to the + signalling must happen-before those in T2 after it returns from the + wait. If no thread was waiting on the CV then there is no + effect.</para> + </listitem> + <listitem><para>If instead T1 broadcasts on a CV, then all of the + waiting threads, rather than just one of them, acquire a + happens-before dependency on the broadcasting thread at the point it + did the broadcast.</para> + </listitem> + <listitem><para>A thread T2 that continues after completing sem_wait + on a semaphore that thread T1 posts on, acquires a happens-before + dependence on the posting thread, a bit like dependencies caused + mutex unlock-lock pairs. However, since a semaphore can be posted + on many times, it is unspecified from which of the post calls the + wait call gets its happens-before dependency.</para> + </listitem> + <listitem><para>For a group of threads T1 .. Tn which arrive at a + barrier and then move on, each thread after the call has a + happens-after dependency from all threads before the + barrier.</para> + </listitem> + <listitem><para>A newly-created child thread acquires an initial + happens-after dependency on the point where its parent created it. + That is, all memory accesses performed by the parent prior to + creating the child are regarded as happening-before all the accesses + of the child.</para> + </listitem> + <listitem><para>Similarly, when an exiting thread is reaped via a + call to pthread_join, once the call returns, the reaping thread + acquires a happens-after dependency relative to all memory accesses + made by the exiting thread.</para> + </listitem> +</itemizedlist> + +<para>In summary: Helgrind intercepts the above listed events, and builds a +directed acyclic graph represented the collective happens-before +dependencies. It also monitors all memory accesses.</para> + +<para>If a location is accessed by two different threads, but Helgrind +cannot find any path through the happens-before graph from one access +to the other, then it reports a race.</para> + +<para>There are a couple of caveats:</para> + +<itemizedlist> + <listitem><para>Helgrind doesn't check for a race in the case where + both accesses are reads. That would be silly, since concurrent + reads are harmless.</para> + </listitem> + <listitem><para>Two accesses are considered to be ordered by the + happens-before dependency even through arbitrarily long chains of + synchronisation events. For example, if T1 accesses some location + L, and then pthread_cond_signals T2, which later + pthread_cond_signals T3, which then accesses L, then a suitable + happens-before dependency exists between the first and second + accesses, even though it involves two different inter-thread + synchronisation events.</para> + </listitem> +</itemizedlist> + +</sect2> + + + +<sect2 id="hg-manual.data-races.errmsgs" xreflabel="Race Error Messages"> +<title>Interpreting Race Error Messages</title> + +<para>Helgrind's race detection algorithm collects a lot of +information, and tries to present it in a helpful way when a race is +detected. Here's an example:</para> + +<programlisting><![CDATA[ +Thread #2 was created + at 0x511C08E: clone (in /lib64/libc-2.8.so) + by 0x4E333A4: do_clone (in /lib64/libpthread-2.8.so) + by 0x4E33A30: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.8.so) + by 0x4C299D4: pthread_create@* (hg_intercepts.c:214) + by 0x4008F2: main (tc21_pthonce.c:86) + +Thread #3 was created + at 0x511C08E: clone (in /lib64/libc-2.8.so) + by 0x4E333A4: do_clone (in /lib64/libpthread-2.8.so) + by 0x4E33A30: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.8.so) + by 0x4C299D4: pthread_create@* (hg_intercepts.c:214) + by 0x4008F2: main (tc21_pthonce.c:86) + +Possible data race during read of size 4 at 0x601070 by thread #3 + at 0x40087A: child (tc21_pthonce.c:74) + by 0x4C29AFF: mythread_wrapper (hg_intercepts.c:194) + by 0x4E3403F: start_thread (in /lib64/libpthread-2.8.so) + by 0x511C0CC: clone (in /lib64/libc-2.8.so) + This conflicts with a previous write of size 4 by thread #2 + at 0x400883: child (tc21_pthonce.c:74) + by 0x4C29AFF: mythread_wrapper (hg_intercepts.c:194) + by 0x4E3403F: start_thread (in /lib64/libpthread-2.8.so) + by 0x511C0CC: clone (in /lib64/libc-2.8.so) + Location 0x601070 is 0 bytes inside local var "unprotected2" + declared at tc21_pthonce.c:51, in frame #0 of thread 3 +]]></programlisting> + +<para>Helgrind first announces the creation points of any threads +referenced in the error message. This is so it can speak concisely +about threads without repeatedly printing their creation point call +stacks. Each thread is only ever announced once, the first time it +appears in any Helgrind error message.</para> + +<para>The main error message begins at the text +"<computeroutput>Possible data race during read</computeroutput>". At +the start is information you would expect to see -- address and size +of the racing access, whether a read or a write, and the call stack at +the point it was detected.</para> + +<para>A second call stack is presented starting at the text +"<computeroutput>This conflicts with a previous +write</computeroutput>". This shows a previous access which also +accessed the stated address, and which is believed to be racing +against the access in the first call stack.</para> + +<para>Finally, Helgrind may attempt to give a description of the +raced-on address in source level terms. In this example, it +identifies it as a local variable, shows its name, declaration point, +and in which frame (of the first call stack) it lives. Note that this +information is only shown when <varname>--read-var-info=yes</varname> +is specified on the command line. That's because reading the DWARF3 +debug information in enough detail to capture variable type and +location information makes Helgrind much slower at startup, and also +requires considerable amounts of memory, for large programs. +</para> + +<para>Once you have your two call stacks, how do you find the root +cause of the race?</para> + +<para>The first thing to do is examine the source locations referred +to by each call stack. They should both show an access to the same +location, or variable.</para> + +<para>Now figure out how how that location should have been made +thread-safe:</para> + +<itemizedlist> + <listitem><para>Perhaps the location was intended to be protected by + a mutex? If so, you need to lock and unlock the mutex at both + access points, even if one of the accesses is reported to be a read. + Did you perhaps forget the locking at one or other of the + accesses?</para> + </listitem> + <listitem><para>Alternatively, perhaps you intended to use a some + other scheme to make it safe, such as signalling on a condition + variable. In all such cases, try to find a synchronisation event + (or a chain thereof) which separates the earlier-observed access (as + shown in the second call stack) from the later-observed access (as + shown in the first call stack). In other words, try to find + evidence that the earlier access "happens-before" the later access. + See the previous subsection for an explanation of the happens-before + relation.</para> + <para> + The fact that Helgrind is reporting a race means it did not observe + any happens-before relation between the two accesses. If + Helgrind is working correctly, it should also be the case that you + also cannot find any such relation, even on detailed inspection + of the source code. Hopefully, though, your inspection of the code + will show where the missing synchronisation operation(s) should have + been.</para> + </listitem> +</itemizedlist> + +</sect2> + + +</sect1> + +<sect1 id="hg-manual.effective-use" xreflabel="Helgrind Effective Use"> +<title>Hints and Tips for Effective Use of Helgrind</title> + +<para>Helgrind can be very helpful in finding and resolving +threading-related problems. Like all sophisticated tools, it is most +effective when you understand how to play to its strengths.</para> + +<para>Helgrind will be less effective when you merely throw an +existing threaded program at it and try to make sense of any reported +errors. It will be more effective if you design threaded programs +from the start in a way that helps Helgrind verify correctness. The +same is true for finding memory errors with Memcheck, but applies more +here, because thread checking is a harder problem. Consequently it is +much easier to write a correct program for which Helgrind falsely +reports (threading) errors than it is to write a correct program for +which Memcheck falsely reports (memory) errors.</para> + +<para>With that in mind, here are some tips, listed most important first, +for getting reliable results and avoiding false errors. The first two +are critical. Any violations of them will swamp you with huge numbers +of false data-race errors.</para> + + +<orderedlist> + + <listitem> + <para>Make sure your application, and all the libraries it uses, + use the POSIX threading primitives. Helgrind needs to be able to + see all events pertaining to thread creation, exit, locking and + other synchronisation events. To do so it intercepts many POSIX + pthread_ functions.</para> + + <para>Do not roll your own threading primitives (mutexes, etc) + from combinations of the Linux futex syscall, atomic counters and + wotnot. These throw Helgrind's internal what's-going-on models + way off course and will give bogus results.</para> + + <para>Also, do not reimplement existing POSIX abstractions using + other POSIX abstractions. For example, don't build your own + semaphore routines or reader-writer locks from POSIX mutexes and + condition variables. Instead use POSIX reader-writer locks and + semaphores directly, since Helgrind supports them directly.</para> + + <para>Helgrind directly supports the following POSIX threading + abstractions: mutexes, reader-writer locks, condition variables + (but see below), semaphores and barriers. Currently spinlocks + are not supported, although they could be in future.</para> + + <para>At the time of writing, the following popular Linux packages + are known to implement their own threading primitives:</para> + + <itemizedlist> + <listitem><para>Qt version 4.X. Qt 3.X is harmless in that it + only uses POSIX pthreads primitives. Unfortunately Qt 4.X + has its own implementation of mutexes (QMutex) and thread reaping. + Helgrind 3.4.x contains direct support + for Qt 4.X threading, which is experimental but is believed to + work fairly well. A side effect of supporting Qt 4 directly is + that Helgrind can be used to debug KDE4 applications. As this + is an experimental feature, we would particularly appreciate + feedback from folks who have used Helgrind to successfully debug + Qt 4 and/or KDE4 applications.</para> + </listitem> + <listitem><para>Runtime support library for GNU OpenMP (part of + GCC), at least GCC versions 4.2 and 4.3. The GNU OpenMP runtime + library (libgomp.so) constructs its own synchronisation + primitives using combinations of atomic memory instructions and + the futex syscall, which causes total chaos since in Helgrind + since it cannot "see" those.</para> + <para>Fortunately, this can be solved using a configuration-time + flag (for gcc). Rebuild gcc from source, and configure using + <varname>--disable-linux-futex</varname>. + This makes libgomp.so use the standard + POSIX threading primitives instead. Note that this was tested + using gcc-4.2.3 and has not been re-tested using more recent gcc + versions. We would appreciate hearing about any successes or + failures with more recent versions.</para> + </listitem> + </itemizedlist> + </listitem> + + <listitem> + <para>Avoid memory recycling. If you can't avoid it, you must use + tell Helgrind what is going on via the VALGRIND_HG_CLEAN_MEMORY + client request + (in <computeroutput>helgrind.h</computeroutput>).</para> + + <para>Helgrind is aware of standard memory allocation and + deallocation that occurs via malloc/free/new/delete and from entry + and exit of stack frames. In particular, when memory is + deallocated via free, delete, or function exit, Helgrind considers + that memory clean, so when it is eventually reallocated, its + history is irrelevant.</para> + + <para>However, it is common practice to implement memory recycling + schemes. In these, memory to be freed is not handed to + malloc/delete, but instead put into a pool of free buffers to be + handed out again as required. The problem is that Helgrind has no + way to know that such memory is logically no longer in use, and + its history is irrelevant. Hence you must make that explicit, + using the VALGRIND_HG_CLEAN_MEMORY client request to specify the + relevant address ranges. It's easiest to put these requests into + the pool manager code, and use them either when memory is returned + to the pool, or is allocated from it.</para> + </listitem> + + <listitem> + <para>Avoid POSIX condition variables. If you can, use POSIX + semaphores (sem_t, sem_post, sem_wait) to do inter-thread event + signalling. Semaphores with an initial value of zero are + particularly useful for this.</para> + + <para>Helgrind only partially correctly handles POSIX condition + variables. This is because Helgrind can see inter-thread + dependencies between a pthread_cond_wait call and a + pthread_cond_signal/broadcast call only if the waiting thread + actually gets to the rendezvous first (so that it actually calls + pthread_cond_wait). It can't see dependencies between the threads + if the signaller arrives first. In the latter case, POSIX + guidelines imply that the associated boolean condition still + provides an inter-thread synchronisation event, but one which is + invisible to Helgrind.</para> + + <para>The result of Helgrind missing some inter-thread + synchronisation events is to cause it to report false positives. + </para> + + <para>The root cause of this synchronisation lossage is + particularly hard to understand, so an example is helpful. It was + discussed at length by Arndt Muehlenfeld ("Runtime Race Detection + in Multi-Threaded Programs", Dissertation, TU Graz, Austria). The + canonical POSIX-recommended usage scheme for condition variables + is as follows:</para> + +<programlisting><![CDATA[ +b is a Boolean condition, which is False most of the time +cv is a condition variable +mx is its associated mutex + +Signaller: Waiter: + +lock(mx) lock(mx) +b = True while (b == False) +signal(cv) wait(cv,mx) +unlock(mx) unlock(mx) +]]></programlisting> + + <para>Assume <computeroutput>b</computeroutput> is False most of + the time. If the waiter arrives at the rendezvous first, it + enters its while-loop, waits for the signaller to signal, and + eventually proceeds. Helgrind sees the signal, notes the + dependency, and all is well.</para> + + <para>If the signaller arrives + first, <computeroutput>b</computeroutput> is set to true, and the + signal disappears into nowhere. When the waiter later arrives, it + does not enter its while-loop and simply carries on. But even in + this case, the waiter code following the while-loop cannot execute + until the signaller sets <computeroutput>b</computeroutput> to + True. Hence there is still the same inter-thread dependency, but + this time it is through an arbitrary in-memory condition, and + Helgrind cannot see it.</para> + + <para>By comparison, Helgrind's detection of inter-thread + dependencies caused by semaphore operations is believed to be + exactly correct.</para> + + <para>As far as I know, a solution to this problem that does not + require source-level annotation of condition-variable wait loops + is beyond the current state of the art.</para> + </listitem> + + <listitem> + <para>Make sure you are using a supported Linux distribution. At + present, Helgrind only properly supports glibc-2.3 or later. This + in turn means we only support glibc's NPTL threading + implementation. The old LinuxThreads implementation is not + supported.</para> + </listitem> + + <listitem> + <para>Round up all finished threads using pthread_join. Avoid + detaching threads: don't create threads in the detached state, and + don't call pthread_detach on existing threads.</para> + + <para>Using pthread_join to round up finished threads provides a + clear synchronisation point that both Helgrind and programmers can + see. If you don't call pthread_join on a thread, Helgrind has no + way to know when it finishes, relative to any significant + synchronisation points for other threads in the program. So it + assumes that the thread lingers indefinitely and can potentially + interfere indefinitely with the memory state of the program. It + has every right to assume that -- after all, it might really be + the case that, for scheduling reasons, the exiting thread did run + very slowly in the last stages of its life.</para> + </listitem> + + <listitem> + <para>Perform thread debugging (with Helgrind) and memory + debugging (with Memcheck) together.</para> + + <para>Helgrind tracks the state of memory in detail, and memory + management bugs in the application are liable to cause confusion. + In extreme cases, applications which do many invalid reads and + writes (particularly to freed memory) have been known to crash + Helgrind. So, ideally, you should make your application + Memcheck-clean before using Helgrind.</para> + + <para>It may be impossible to make your application Memcheck-clean + unless you first remove threading bugs. In particular, it may be + difficult to remove all reads and writes to freed memory in + multithreaded C++ destructor sequences at program termination. + So, ideally, you should make your application Helgrind-clean + before using Memcheck.</para> + + <para>Since this circularity is obviously unresolvable, at least + bear in mind that Memcheck and Helgrind are to some extent + complementary, and you may need to use them together.</para> + </listitem> + + <listitem> + <para>POSIX requires that implementations of standard I/O (printf, + fprintf, fwrite, fread, etc) are thread safe. Unfortunately GNU + libc implements this by using internal locking primitives that + Helgrind is unable to intercept. Consequently Helgrind generates + many false race reports when you use these functions.</para> + + <para>Helgrind attempts to hide these errors using the standard + Valgrind error-suppression mechanism. So, at least for simple + test cases, you don't see any. Nevertheless, some may slip + through. Just something to be aware of.</para> + </listitem> + + <listitem> + <para>Helgrind's error checks do not work properly inside the + system threading library itself + (<computeroutput>libpthread.so</computeroutput>), and it usually + observes large numbers of (false) errors in there. Valgrind's + suppression system then filters these out, so you should not see + them.</para> + + <para>If you see any race errors reported + where <computeroutput>libpthread.so</computeroutput> or + <computeroutput>ld.so</computeroutput> is the object associated + with the innermost stack frame, please file a bug report at + http://www.valgrind.org.</para> + </listitem> + +</orderedlist> + +</sect1> + + + + +<sect1 id="hg-manual.options" xreflabel="Helgrind Options"> +<title>Helgrind Options</title> + +<para>The following end-user options are available:</para> + +<!-- start of xi:include in the manpage --> +<variablelist id="hg.opts.list"> + + <varlistentry id="opt.track-lockorders" + xreflabel="--track-lockorders"> + <term> + <option><![CDATA[--track-lockorders=no|yes + [default: yes] ]]></option> + </term> + <listitem> + <para>When enabled (the default), Helgrind performs lock order + consistency checking. For some buggy programs, the large number + of lock order errors reported can become annoying, particularly + if you're only interested in race errors. You may therefore find + it helpful to disable lock order checking.</para> + </listitem> + </varlistentry> + + <varlistentry id="opt.show-conflicts" + xreflabel="--show-conflicts"> + <term> + <option><![CDATA[--show-conflicts=no|yes + [default: yes] ]]></option> + </term> + <listitem> + <para>When enabled (the default), Helgrind collects enough + information about "old" accesses that it can produce two stack + traces in a race report -- both the stack trace for the + current access, and the trace for the older, conflicting + access.</para> + <para>Collecting such information is expensive in both speed and + memory. This flag disables collection of such information. + Helgrind will run significantly faster and use less memory, + but without the conflicting access stacks, it will be very + much more difficult to track down the root causes of + races. However, this option may be useful in situations where + you just want to check for the presence or absence of races, + for example, when doing regression testing of a previously + race-free program.</para> + </listitem> + </varlistentry> + + <varlistentry id="opt.conflict-cache-size" + xreflabel="--conflict-cache-size"> + <term> + <option><![CDATA[--conflict-cache-size=N + [default: 1000000] ]]></option> + </term> + <listitem> + <para>Information about "old" conflicting accesses is stored in + a cache of limited size, with LRU-style management. This is + necessary because it isn't practical to store a stack trace + for every single memory access made by the program. + Historical information on not recently accessed locations is + periodically discarded, to free up space in the cache.</para> + <para>This flag controls the size of the cache, in terms of the + number of different memory addresses for which + conflicting access information is stored. If you find that + Helgrind is showing race errors with only one stack instead of + the expected two stacks, try increasing this value.</para> + <para>The minimum value is 10,000 and the maximum is 10,000,000 + (ten times the default value). Increasing the value by 1 + increases Helgrind's memory requirement by very roughly 100 + bytes, so the maximum value will easily eat up an extra + gigabyte or so of memory.</para> + </listitem> + </varlistentry> + +</variablelist> +<!-- end of xi:include in the manpage --> + +<!-- start of xi:include in the manpage --> +<para>In addition, the following debugging options are available for +Helgrind:</para> + +<variablelist id="hg.debugopts.list"> + + <varlistentry id="opt.trace-malloc" xreflabel="--trace-malloc"> + <term> + <option><![CDATA[--trace-malloc=no|yes [no] + ]]></option> + </term> + <listitem> + <para>Show all client malloc (etc) and free (etc) requests.</para> + </listitem> + </varlistentry> + + <varlistentry id="opt.cmp-race-err-addrs" + xreflabel="--cmp-race-err-addrs"> + <term> + <option><![CDATA[--cmp-race-err-addrs=no|yes [no] + ]]></option> + </term> + <listitem> + <para>Controls whether or not race (data) addresses should be + taken into account when removing duplicates of race errors. + With <varname>--cmp-race-err-addrs=no</varname>, two otherwise + identical race errors will be considered to be the same if + their race addresses differ. With + With <varname>--cmp-race-err-addrs=yes</varname> they will be + considered different. This is provided to help make certain + regression tests work reliably.</para> + </listitem> + </varlistentry> + + <varlistentry id="opt.hg-sanity-flags" xreflabel="--hg-sanity-flags"> + <term> + <option><![CDATA[--hg-sanity-flags=<XXXXXX> (X = 0|1) [000000] + ]]></option> + </term> + <listitem> + <para>Run extensive sanity checks on Helgrind's internal + data structures at events defined by the bitstring, as + follows:</para> + <para><computeroutput>010000 </computeroutput>after changes to + the lock order acquisition graph</para> + <para><computeroutput>001000 </computeroutput>after every client + memory access (NB: not currently used)</para> + <para><computeroutput>000100 </computeroutput>after every client + memory range permission setting of 256 bytes or greater</para> + <para><computeroutput>000010 </computeroutput>after every client + lock or unlock event</para> + <para><computeroutput>000001 </computeroutput>after every client + thread creation or joinage event</para> + <para>Note these will make Helgrind run very slowly, often to + the point of being completely unusable.</para> + </listitem> + </varlistentry> + +</variablelist> +<!-- end of xi:include in the manpage --> + + +</sect1> + +<sect1 id="hg-manual.todolist" xreflabel="To Do List"> +<title>A To-Do List for Helgrind</title> + +<para>The following is a list of loose ends which should be tidied up +some time.</para> + +<itemizedlist> + <listitem><para>Track which mutexes are associated with which + condition variables, and emit a warning if this becomes + inconsistent.</para> + </listitem> + <listitem><para>For lock order errors, print the complete lock + cycle, rather than only doing for size-2 cycles as at + present.</para> + </listitem> + <listitem><para>Document the VALGRIND_HG_CLEAN_MEMORY client + request.</para> + </listitem> + <listitem><para>The conflicting access mechanism sometimes + mysteriously fails to show the conflicting access' stack, even + when provided with unbounded storage for conflicting access info. + This should be investigated.</para> + </listitem> + <listitem><para>Document races caused by gcc's thread-unsafe code + generation for speculative stores. In the interim see + <computeroutput>http://gcc.gnu.org/ml/gcc/2007-10/msg00266.html + </computeroutput> + and <computeroutput>http://lkml.org/lkml/2007/10/24/673</computeroutput>. + </para> + </listitem> + <listitem><para>Don't update the lock-order graph, and don't check + for errors, when a "try"-style lock operation happens (eg + pthread_mutex_trylock). Such calls do not add any real + restrictions to the locking order, since they can always fail to + acquire the lock, resulting in the caller going off and doing Plan + B (presumably it will have a Plan B). Doing such checks could + generate false lock-order errors and confuse users.</para> + </listitem> + <listitem><para> Performance can be very poor. Slowdowns on the + order of 100:1 are not unusual. There is limited scope for + performance improvements. + </para> + </listitem> + +</itemizedlist> + +</sect1> + +</chapter> diff --git a/helgrind/helgrind-x86-linux b/helgrind/helgrind-x86-linux Binary files differnew file mode 100755 index 0000000..601a2c2 --- /dev/null +++ b/helgrind/helgrind-x86-linux diff --git a/helgrind/helgrind.h b/helgrind/helgrind.h new file mode 100644 index 0000000..7696e7d --- /dev/null +++ b/helgrind/helgrind.h @@ -0,0 +1,113 @@ +/* + ---------------------------------------------------------------- + + Notice that the above BSD-style license applies to this one file + (helgrind.h) only. The entire rest of Valgrind is licensed under + the terms of the GNU General Public License, version 2. See the + COPYING file in the source distribution for details. + + ---------------------------------------------------------------- + + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks LLP + info@open-works.co.uk + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + + 3. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + + 4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + ---------------------------------------------------------------- + + Notice that the above BSD-style license applies to this one file + (helgrind.h) only. The entire rest of Valgrind is licensed under + the terms of the GNU General Public License, version 2. See the + COPYING file in the source distribution for details. + + ---------------------------------------------------------------- +*/ + +#ifndef __HELGRIND_H +#define __HELGRIND_H + +#include "valgrind.h" + +typedef + enum { + VG_USERREQ__HG_CLEAN_MEMORY = VG_USERREQ_TOOL_BASE('H','G'), + + /* The rest are for Helgrind's internal use. Not for end-user + use. Do not use them unless you are a Valgrind developer. */ + + /* Notify the tool what this thread's pthread_t is. */ + _VG_USERREQ__HG_SET_MY_PTHREAD_T = VG_USERREQ_TOOL_BASE('H','G') + + 256, + _VG_USERREQ__HG_PTH_API_ERROR, /* char*, int */ + _VG_USERREQ__HG_PTHREAD_JOIN_POST, /* pthread_t of quitter */ + _VG_USERREQ__HG_PTHREAD_MUTEX_INIT_POST, /* pth_mx_t*, long mbRec */ + _VG_USERREQ__HG_PTHREAD_MUTEX_DESTROY_PRE, /* pth_mx_t* */ + _VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_PRE, /* pth_mx_t* */ + _VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_POST, /* pth_mx_t* */ + _VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, /* pth_mx_t*, long isTryLock */ + _VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, /* pth_mx_t* */ + _VG_USERREQ__HG_PTHREAD_COND_SIGNAL_PRE, /* pth_cond_t* */ + _VG_USERREQ__HG_PTHREAD_COND_BROADCAST_PRE, /* pth_cond_t* */ + _VG_USERREQ__HG_PTHREAD_COND_WAIT_PRE, /* pth_cond_t*, pth_mx_t* */ + _VG_USERREQ__HG_PTHREAD_COND_WAIT_POST, /* pth_cond_t*, pth_mx_t* */ + _VG_USERREQ__HG_PTHREAD_COND_DESTROY_PRE, /* pth_cond_t* */ + _VG_USERREQ__HG_PTHREAD_RWLOCK_INIT_POST, /* pth_rwlk_t* */ + _VG_USERREQ__HG_PTHREAD_RWLOCK_DESTROY_PRE, /* pth_rwlk_t* */ + _VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE, /* pth_rwlk_t*, long isW */ + _VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST, /* pth_rwlk_t*, long isW */ + _VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_PRE, /* pth_rwlk_t* */ + _VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_POST, /* pth_rwlk_t* */ + _VG_USERREQ__HG_POSIX_SEM_INIT_POST, /* sem_t*, ulong value */ + _VG_USERREQ__HG_POSIX_SEM_DESTROY_PRE, /* sem_t* */ + _VG_USERREQ__HG_POSIX_SEM_POST_PRE, /* sem_t* */ + _VG_USERREQ__HG_POSIX_SEM_WAIT_POST, /* sem_t* */ + _VG_USERREQ__HG_PTHREAD_BARRIER_INIT_PRE, /* pth_bar_t*, ulong */ + _VG_USERREQ__HG_PTHREAD_BARRIER_WAIT_PRE, /* pth_bar_t* */ + _VG_USERREQ__HG_PTHREAD_BARRIER_DESTROY_PRE /* pth_bar_t* */ + } Vg_TCheckClientRequest; + +/* Clean memory state. This makes Helgrind forget everything it knew + about the specified memory range, and resets it to New. This is + particularly useful for memory allocators that wish to recycle + memory. */ +#define VALGRIND_HG_CLEAN_MEMORY(_qzz_start, _qzz_len) \ + do { \ + unsigned long _qzz_res; \ + VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, VG_USERREQ__HG_CLEAN_MEMORY, \ + _qzz_start, _qzz_len, 0, 0, 0); \ + (void)0; \ + } while(0) + +#endif /* __HELGRIND_H */ diff --git a/helgrind/hg_basics.c b/helgrind/hg_basics.c new file mode 100644 index 0000000..d7f3fa7 --- /dev/null +++ b/helgrind/hg_basics.c @@ -0,0 +1,86 @@ + +/*--------------------------------------------------------------------*/ +/*--- Basic definitions for all of Helgrind. ---*/ +/*--- hg_basics.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_libcbase.h" +#include "pub_tool_libcassert.h" +#include "pub_tool_mallocfree.h" +#include "pub_tool_threadstate.h" + +#include "hg_basics.h" /* self */ + + +/*----------------------------------------------------------------*/ +/*--- Very basic stuff ---*/ +/*----------------------------------------------------------------*/ + +void* HG_(zalloc) ( HChar* cc, SizeT n ) +{ + void* p; + tl_assert(n > 0); + p = VG_(malloc)( cc, n ); + tl_assert(p); + VG_(memset)(p, 0, n); + return p; +} + +void HG_(free) ( void* p ) +{ + tl_assert(p); + VG_(free)(p); +} + +Char* HG_(strdup) ( HChar* cc, const Char* s ) +{ + return VG_(strdup)( cc, s ); +} + + +/*----------------------------------------------------------------*/ +/*--- Command line options ---*/ +/*----------------------------------------------------------------*/ + +/* Description of these flags is in hg_basics.h. */ + +Bool HG_(clo_track_lockorders) = True; + +Bool HG_(clo_cmp_race_err_addrs) = False; + +Bool HG_(clo_show_conflicts) = True; + +UWord HG_(clo_conflict_cache_size) = 1000000; + +Word HG_(clo_sanity_flags) = 0; + + +/*--------------------------------------------------------------------*/ +/*--- end hg_basics.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/hg_basics.h b/helgrind/hg_basics.h new file mode 100644 index 0000000..4923c0e --- /dev/null +++ b/helgrind/hg_basics.h @@ -0,0 +1,97 @@ + +/*--------------------------------------------------------------------*/ +/*--- Basic definitions for all of Helgrind. ---*/ +/*--- hg_basics.h ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#ifndef __HG_BASICS_H +#define __HG_BASICS_H + + +/*----------------------------------------------------------------*/ +/*--- Very basic stuff ---*/ +/*----------------------------------------------------------------*/ + +#define HG_(str) VGAPPEND(vgHelgrind_,str) + +void* HG_(zalloc) ( HChar* cc, SizeT n ); +void HG_(free) ( void* p ); +Char* HG_(strdup) ( HChar* cc, const Char* s ); + +static inline Bool HG_(is_sane_ThreadId) ( ThreadId coretid ) { + return coretid >= 0 && coretid < VG_N_THREADS; +} + + +/*----------------------------------------------------------------*/ +/*--- Command line options ---*/ +/*----------------------------------------------------------------*/ + +/* Flags for controlling for which events sanity checking is done */ +#define SCE_THREADS (1<<0) // Sanity check at thread create/join +#define SCE_LOCKS (1<<1) // Sanity check at lock events +#define SCE_BIGRANGE (1<<2) // Sanity check at big mem range events +#define SCE_ACCESS (1<<3) // Sanity check at mem accesses +#define SCE_LAOG (1<<4) // Sanity check at significant LAOG events + +#define SCE_BIGRANGE_T 256 // big mem range minimum size + + +/* Enable/disable lock order checking. Sometimes it produces a lot of + errors, possibly genuine, which nevertheless can be very + annoying. */ +extern Bool HG_(clo_track_lockorders); + +/* When comparing race errors for equality, should the race address be + taken into account? For users, no, but for verification purposes + (regtesting) this is sometimes important. */ +extern Bool HG_(clo_cmp_race_err_addrs); + +/* Show conflicting accesses? This involves collecting and storing + large numbers of call stacks just in case we might need to show + them later, and so is expensive (although very useful). Hence + allow it to be optionally disabled. */ +extern Bool HG_(clo_show_conflicts); + +/* Size of the conflicting-access cache, measured in terms of + maximum possible number of elements in the previous-access map. + Must be between 10k amd 10 million. Default is 1 million. */ +extern UWord HG_(clo_conflict_cache_size); + +/* Sanity check level. This is an or-ing of + SCE_{THREADS,LOCKS,BIGRANGE,ACCESS,LAOG}. */ +extern Word HG_(clo_sanity_flags); + + + + +#endif /* ! __HG_BASICS_H */ + +/*--------------------------------------------------------------------*/ +/*--- end hg_basics.h ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/hg_errors.c b/helgrind/hg_errors.c new file mode 100644 index 0000000..fbb499b --- /dev/null +++ b/helgrind/hg_errors.c @@ -0,0 +1,813 @@ + +/*--------------------------------------------------------------------*/ +/*--- Error management for Helgrind. ---*/ +/*--- hg_errors.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_libcbase.h" +#include "pub_tool_libcassert.h" +#include "pub_tool_libcprint.h" +#include "pub_tool_execontext.h" +#include "pub_tool_errormgr.h" +#include "pub_tool_wordfm.h" +#include "pub_tool_xarray.h" +#include "pub_tool_debuginfo.h" +#include "pub_tool_threadstate.h" + +#include "hg_basics.h" +#include "hg_wordset.h" +#include "hg_lock_n_thread.h" +#include "libhb.h" +#include "hg_errors.h" /* self */ + + +/*----------------------------------------------------------------*/ +/*--- ---*/ +/*----------------------------------------------------------------*/ + +/* This has to do with printing error messages. See comments on + announce_threadset() and summarise_threadset(). Perhaps it + should be a command line option. */ +#define N_THREADS_TO_ANNOUNCE 5 + + +/*----------------------------------------------------------------*/ +/*--- Error management ---*/ +/*----------------------------------------------------------------*/ + +/* maps (by value) strings to a copy of them in ARENA_TOOL */ + +static WordFM* string_table = NULL; + +ULong HG_(stats__string_table_queries) = 0; + +ULong HG_(stats__string_table_get_map_size) ( void ) { + return string_table ? (ULong)VG_(sizeFM)(string_table) : 0; +} + +static Word string_table_cmp ( UWord s1, UWord s2 ) { + return (Word)VG_(strcmp)( (HChar*)s1, (HChar*)s2 ); +} + +static HChar* string_table_strdup ( HChar* str ) { + HChar* copy = NULL; + HG_(stats__string_table_queries)++; + if (!str) + str = "(null)"; + if (!string_table) { + string_table = VG_(newFM)( HG_(zalloc), "hg.sts.1", + HG_(free), string_table_cmp ); + tl_assert(string_table); + } + if (VG_(lookupFM)( string_table, + NULL, (Word*)©, (Word)str )) { + tl_assert(copy); + if (0) VG_(printf)("string_table_strdup: %p -> %p\n", str, copy ); + return copy; + } else { + copy = HG_(strdup)("hg.sts.2", str); + tl_assert(copy); + VG_(addToFM)( string_table, (Word)copy, (Word)copy ); + return copy; + } +} + +/* maps from Lock .unique fields to LockP*s */ + +static WordFM* map_LockN_to_P = NULL; + +ULong HG_(stats__LockN_to_P_queries) = 0; + +ULong HG_(stats__LockN_to_P_get_map_size) ( void ) { + return map_LockN_to_P ? (ULong)VG_(sizeFM)(map_LockN_to_P) : 0; +} + +static Word lock_unique_cmp ( UWord lk1W, UWord lk2W ) +{ + Lock* lk1 = (Lock*)lk1W; + Lock* lk2 = (Lock*)lk2W; + tl_assert( HG_(is_sane_LockNorP)(lk1) ); + tl_assert( HG_(is_sane_LockNorP)(lk2) ); + if (lk1->unique < lk2->unique) return -1; + if (lk1->unique > lk2->unique) return 1; + return 0; +} + +static Lock* mk_LockP_from_LockN ( Lock* lkn ) +{ + Lock* lkp = NULL; + HG_(stats__LockN_to_P_queries)++; + tl_assert( HG_(is_sane_LockN)(lkn) ); + if (!map_LockN_to_P) { + map_LockN_to_P = VG_(newFM)( HG_(zalloc), "hg.mLPfLN.1", + HG_(free), lock_unique_cmp ); + tl_assert(map_LockN_to_P); + } + if (!VG_(lookupFM)( map_LockN_to_P, NULL, (Word*)&lkp, (Word)lkn)) { + lkp = HG_(zalloc)( "hg.mLPfLN.2", sizeof(Lock) ); + *lkp = *lkn; + lkp->admin = NULL; + lkp->magic = LockP_MAGIC; + /* Forget about the bag of lock holders - don't copy that. + Also, acquired_at should be NULL whenever heldBy is, and vice + versa. Also forget about the associated libhb synch object. */ + lkp->heldW = False; + lkp->heldBy = NULL; + lkp->acquired_at = NULL; + lkp->hbso = NULL; + VG_(addToFM)( map_LockN_to_P, (Word)lkp, (Word)lkp ); + } + tl_assert( HG_(is_sane_LockP)(lkp) ); + return lkp; +} + +/* Errors: + + race: program counter + read or write + data size + previous state + current state + + FIXME: how does state printing interact with lockset gc? + Are the locksets in prev/curr state always valid? + Ditto question for the threadsets + ThreadSets - probably are always valid if Threads + are never thrown away. + LockSets - could at least print the lockset elements that + correspond to actual locks at the time of printing. Hmm. +*/ + +/* Error kinds */ +typedef + enum { + XE_Race=1101, // race + XE_FreeMemLock, // freeing memory containing a locked lock + XE_UnlockUnlocked, // unlocking a not-locked lock + XE_UnlockForeign, // unlocking a lock held by some other thread + XE_UnlockBogus, // unlocking an address not known to be a lock + XE_PthAPIerror, // error from the POSIX pthreads API + XE_LockOrder, // lock order error + XE_Misc // misc other error (w/ string to describe it) + } + XErrorTag; + +/* Extra contexts for kinds */ +typedef + struct { + XErrorTag tag; + union { + struct { + Addr data_addr; + Int szB; + Bool isWrite; + ExeContext* mb_lastlock; + ExeContext* mb_confacc; + Thread* thr; + Thread* mb_confaccthr; + Int mb_confaccSzB; + Bool mb_confaccIsW; + Char descr1[96]; + Char descr2[96]; + } Race; + struct { + Thread* thr; /* doing the freeing */ + Lock* lock; /* lock which is locked */ + } FreeMemLock; + struct { + Thread* thr; /* doing the unlocking */ + Lock* lock; /* lock (that is already unlocked) */ + } UnlockUnlocked; + struct { + Thread* thr; /* doing the unlocking */ + Thread* owner; /* thread that actually holds the lock */ + Lock* lock; /* lock (that is held by 'owner') */ + } UnlockForeign; + struct { + Thread* thr; /* doing the unlocking */ + Addr lock_ga; /* purported address of the lock */ + } UnlockBogus; + struct { + Thread* thr; + HChar* fnname; /* persistent, in tool-arena */ + Word err; /* pth error code */ + HChar* errstr; /* persistent, in tool-arena */ + } PthAPIerror; + struct { + Thread* thr; + Addr before_ga; /* always locked first in prog. history */ + Addr after_ga; + ExeContext* before_ec; + ExeContext* after_ec; + } LockOrder; + struct { + Thread* thr; + HChar* errstr; /* persistent, in tool-arena */ + } Misc; + } XE; + } + XError; + +static void init_XError ( XError* xe ) { + VG_(memset)(xe, 0, sizeof(*xe) ); + xe->tag = XE_Race-1; /* bogus */ +} + + +/* Extensions of suppressions */ +typedef + enum { + XS_Race=1201, /* race */ + XS_FreeMemLock, + XS_UnlockUnlocked, + XS_UnlockForeign, + XS_UnlockBogus, + XS_PthAPIerror, + XS_LockOrder, + XS_Misc + } + XSuppTag; + + +/* Updates the copy with address info if necessary. */ +UInt HG_(update_extra) ( Error* err ) +{ + XError* xe = (XError*)VG_(get_error_extra)(err); + tl_assert(xe); + //if (extra != NULL && Undescribed == extra->addrinfo.akind) { + // describe_addr ( VG_(get_error_address)(err), &(extra->addrinfo) ); + //} + + if (xe->tag == XE_Race) { + /* See if we can come up with a source level description of the + raced-upon address. This is potentially expensive, which is + why it's only done at the update_extra point, not when the + error is initially created. */ + static Int xxx = 0; + xxx++; + if (0) + VG_(printf)("HG_(update_extra): " + "%d conflicting-event queries\n", xxx); + tl_assert(sizeof(xe->XE.Race.descr1) == sizeof(xe->XE.Race.descr2)); + if (VG_(get_data_description)( + &xe->XE.Race.descr1[0], + &xe->XE.Race.descr2[0], + sizeof(xe->XE.Race.descr1)-1, + xe->XE.Race.data_addr )) { + tl_assert( xe->XE.Race.descr1 + [ sizeof(xe->XE.Race.descr1)-1 ] == 0); + tl_assert( xe->XE.Race.descr2 + [ sizeof(xe->XE.Race.descr2)-1 ] == 0); + } + { Thr* thrp = NULL; + ExeContext* wherep = NULL; + Addr acc_addr = xe->XE.Race.data_addr; + Int acc_szB = xe->XE.Race.szB; + Thr* acc_thr = xe->XE.Race.thr->hbthr; + Bool acc_isW = xe->XE.Race.isWrite; + SizeT conf_szB = 0; + Bool conf_isW = False; + tl_assert(!xe->XE.Race.mb_confacc); + tl_assert(!xe->XE.Race.mb_confaccthr); + if (libhb_event_map_lookup( + &wherep, &thrp, &conf_szB, &conf_isW, + acc_thr, acc_addr, acc_szB, acc_isW )) { + Thread* threadp; + tl_assert(wherep); + tl_assert(thrp); + threadp = libhb_get_Thr_opaque( thrp ); + tl_assert(threadp); + xe->XE.Race.mb_confacc = wherep; + xe->XE.Race.mb_confaccthr = threadp; + xe->XE.Race.mb_confaccSzB = (Int)conf_szB; + xe->XE.Race.mb_confaccIsW = conf_isW; + } + } + } + + return sizeof(XError); +} + +void HG_(record_error_Race) ( Thread* thr, + Addr data_addr, Int szB, Bool isWrite, + ExeContext* mb_lastlock ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + +# if defined(VGO_linux) + /* Skip any races on locations apparently in GOTPLT sections. This + is said to be caused by ld.so poking PLT table entries (or + whatever) when it writes the resolved address of a dynamically + linked routine, into the table (or whatever) when it is called + for the first time. */ + { + VgSectKind sect = VG_(seginfo_sect_kind)( NULL, 0, data_addr ); + if (0) VG_(printf)("XXXXXXXXX RACE on %#lx %s\n", + data_addr, VG_(pp_SectKind)(sect)); + /* SectPLT is required on ???-linux */ + if (sect == Vg_SectGOTPLT) return; + /* SectPLT is required on ppc32/64-linux */ + if (sect == Vg_SectPLT) return; + } +# endif + + init_XError(&xe); + xe.tag = XE_Race; + xe.XE.Race.data_addr = data_addr; + xe.XE.Race.szB = szB; + xe.XE.Race.isWrite = isWrite; + xe.XE.Race.mb_lastlock = mb_lastlock; + xe.XE.Race.thr = thr; + tl_assert(isWrite == False || isWrite == True); + tl_assert(szB == 8 || szB == 4 || szB == 2 || szB == 1); + xe.XE.Race.descr1[0] = xe.XE.Race.descr2[0] = 0; + // FIXME: tid vs thr + // Skip on any of the conflicting-access info at this point. + // It's expensive to obtain, and this error is more likely than + // not to be discarded. We'll fill these fields in in + // HG_(update_extra) just above, assuming the error ever makes + // it that far (unlikely). + xe.XE.Race.mb_confaccSzB = 0; + xe.XE.Race.mb_confaccIsW = False; + xe.XE.Race.mb_confacc = NULL; + xe.XE.Race.mb_confaccthr = NULL; + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_Race, data_addr, NULL, &xe ); +} + +void HG_(record_error_FreeMemLock) ( Thread* thr, Lock* lk ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + tl_assert( HG_(is_sane_LockN)(lk) ); + init_XError(&xe); + xe.tag = XE_FreeMemLock; + xe.XE.FreeMemLock.thr = thr; + xe.XE.FreeMemLock.lock = mk_LockP_from_LockN(lk); + // FIXME: tid vs thr + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_FreeMemLock, 0, NULL, &xe ); +} + +void HG_(record_error_UnlockUnlocked) ( Thread* thr, Lock* lk ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + tl_assert( HG_(is_sane_LockN)(lk) ); + init_XError(&xe); + xe.tag = XE_UnlockUnlocked; + xe.XE.UnlockUnlocked.thr = thr; + xe.XE.UnlockUnlocked.lock = mk_LockP_from_LockN(lk); + // FIXME: tid vs thr + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_UnlockUnlocked, 0, NULL, &xe ); +} + +void HG_(record_error_UnlockForeign) ( Thread* thr, + Thread* owner, Lock* lk ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + tl_assert( HG_(is_sane_Thread)(owner) ); + tl_assert( HG_(is_sane_LockN)(lk) ); + init_XError(&xe); + xe.tag = XE_UnlockForeign; + xe.XE.UnlockForeign.thr = thr; + xe.XE.UnlockForeign.owner = owner; + xe.XE.UnlockForeign.lock = mk_LockP_from_LockN(lk); + // FIXME: tid vs thr + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_UnlockForeign, 0, NULL, &xe ); +} + +void HG_(record_error_UnlockBogus) ( Thread* thr, Addr lock_ga ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + init_XError(&xe); + xe.tag = XE_UnlockBogus; + xe.XE.UnlockBogus.thr = thr; + xe.XE.UnlockBogus.lock_ga = lock_ga; + // FIXME: tid vs thr + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_UnlockBogus, 0, NULL, &xe ); +} + +void HG_(record_error_LockOrder)( + Thread* thr, Addr before_ga, Addr after_ga, + ExeContext* before_ec, ExeContext* after_ec + ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + if (!HG_(clo_track_lockorders)) + return; + init_XError(&xe); + xe.tag = XE_LockOrder; + xe.XE.LockOrder.thr = thr; + xe.XE.LockOrder.before_ga = before_ga; + xe.XE.LockOrder.before_ec = before_ec; + xe.XE.LockOrder.after_ga = after_ga; + xe.XE.LockOrder.after_ec = after_ec; + // FIXME: tid vs thr + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_LockOrder, 0, NULL, &xe ); +} + +void HG_(record_error_PthAPIerror) ( Thread* thr, HChar* fnname, + Word err, HChar* errstr ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + tl_assert(fnname); + tl_assert(errstr); + init_XError(&xe); + xe.tag = XE_PthAPIerror; + xe.XE.PthAPIerror.thr = thr; + xe.XE.PthAPIerror.fnname = string_table_strdup(fnname); + xe.XE.PthAPIerror.err = err; + xe.XE.PthAPIerror.errstr = string_table_strdup(errstr); + // FIXME: tid vs thr + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_PthAPIerror, 0, NULL, &xe ); +} + +void HG_(record_error_Misc) ( Thread* thr, HChar* errstr ) +{ + XError xe; + tl_assert( HG_(is_sane_Thread)(thr) ); + tl_assert(errstr); + init_XError(&xe); + xe.tag = XE_Misc; + xe.XE.Misc.thr = thr; + xe.XE.Misc.errstr = string_table_strdup(errstr); + // FIXME: tid vs thr + tl_assert( HG_(is_sane_ThreadId)(thr->coretid) ); + tl_assert( thr->coretid != VG_INVALID_THREADID ); + VG_(maybe_record_error)( thr->coretid, + XE_Misc, 0, NULL, &xe ); +} + +Bool HG_(eq_Error) ( VgRes not_used, Error* e1, Error* e2 ) +{ + XError *xe1, *xe2; + + tl_assert(VG_(get_error_kind)(e1) == VG_(get_error_kind)(e2)); + + xe1 = (XError*)VG_(get_error_extra)(e1); + xe2 = (XError*)VG_(get_error_extra)(e2); + tl_assert(xe1); + tl_assert(xe2); + + switch (VG_(get_error_kind)(e1)) { + case XE_Race: + return xe1->XE.Race.szB == xe2->XE.Race.szB + && xe1->XE.Race.isWrite == xe2->XE.Race.isWrite + && (HG_(clo_cmp_race_err_addrs) + ? xe1->XE.Race.data_addr == xe2->XE.Race.data_addr + : True); + case XE_FreeMemLock: + return xe1->XE.FreeMemLock.thr == xe2->XE.FreeMemLock.thr + && xe1->XE.FreeMemLock.lock == xe2->XE.FreeMemLock.lock; + case XE_UnlockUnlocked: + return xe1->XE.UnlockUnlocked.thr == xe2->XE.UnlockUnlocked.thr + && xe1->XE.UnlockUnlocked.lock == xe2->XE.UnlockUnlocked.lock; + case XE_UnlockForeign: + return xe1->XE.UnlockForeign.thr == xe2->XE.UnlockForeign.thr + && xe1->XE.UnlockForeign.owner == xe2->XE.UnlockForeign.owner + && xe1->XE.UnlockForeign.lock == xe2->XE.UnlockForeign.lock; + case XE_UnlockBogus: + return xe1->XE.UnlockBogus.thr == xe2->XE.UnlockBogus.thr + && xe1->XE.UnlockBogus.lock_ga == xe2->XE.UnlockBogus.lock_ga; + case XE_PthAPIerror: + return xe1->XE.PthAPIerror.thr == xe2->XE.PthAPIerror.thr + && 0==VG_(strcmp)(xe1->XE.PthAPIerror.fnname, + xe2->XE.PthAPIerror.fnname) + && xe1->XE.PthAPIerror.err == xe2->XE.PthAPIerror.err; + case XE_LockOrder: + return xe1->XE.LockOrder.thr == xe2->XE.LockOrder.thr; + case XE_Misc: + return xe1->XE.Misc.thr == xe2->XE.Misc.thr + && 0==VG_(strcmp)(xe1->XE.Misc.errstr, xe2->XE.Misc.errstr); + default: + tl_assert(0); + } + + /*NOTREACHED*/ + tl_assert(0); +} + + +/* Announce (that is, print the point-of-creation) of 'thr'. Only do + this once, as we only want to see these announcements once per + thread. */ +static void announce_one_thread ( Thread* thr ) +{ + tl_assert(HG_(is_sane_Thread)(thr)); + tl_assert(thr->errmsg_index >= 1); + if (!thr->announced) { + if (thr->errmsg_index == 1) { + tl_assert(thr->created_at == NULL); + VG_(message)(Vg_UserMsg, "Thread #%d is the program's root thread", + thr->errmsg_index); + } else { + tl_assert(thr->created_at != NULL); + VG_(message)(Vg_UserMsg, "Thread #%d was created", + thr->errmsg_index); + VG_(pp_ExeContext)( thr->created_at ); + } + VG_(message)(Vg_UserMsg, ""); + thr->announced = True; + } +} + + +void HG_(pp_Error) ( Error* err ) +{ + XError *xe = (XError*)VG_(get_error_extra)(err); + + switch (VG_(get_error_kind)(err)) { + + case XE_Misc: { + tl_assert(xe); + tl_assert( HG_(is_sane_Thread)( xe->XE.Misc.thr ) ); + announce_one_thread( xe->XE.Misc.thr ); + VG_(message)(Vg_UserMsg, + "Thread #%d: %s", + (Int)xe->XE.Misc.thr->errmsg_index, + xe->XE.Misc.errstr); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + break; + } + + case XE_LockOrder: { + tl_assert(xe); + tl_assert( HG_(is_sane_Thread)( xe->XE.LockOrder.thr ) ); + announce_one_thread( xe->XE.LockOrder.thr ); + VG_(message)(Vg_UserMsg, + "Thread #%d: lock order \"%p before %p\" violated", + (Int)xe->XE.LockOrder.thr->errmsg_index, + (void*)xe->XE.LockOrder.before_ga, + (void*)xe->XE.LockOrder.after_ga); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + if (xe->XE.LockOrder.before_ec && xe->XE.LockOrder.after_ec) { + VG_(message)(Vg_UserMsg, + " Required order was established by acquisition of lock at %p", + (void*)xe->XE.LockOrder.before_ga); + VG_(pp_ExeContext)( xe->XE.LockOrder.before_ec ); + VG_(message)(Vg_UserMsg, + " followed by a later acquisition of lock at %p", + (void*)xe->XE.LockOrder.after_ga); + VG_(pp_ExeContext)( xe->XE.LockOrder.after_ec ); + } + break; + } + + case XE_PthAPIerror: { + tl_assert(xe); + tl_assert( HG_(is_sane_Thread)( xe->XE.PthAPIerror.thr ) ); + announce_one_thread( xe->XE.PthAPIerror.thr ); + VG_(message)(Vg_UserMsg, + "Thread #%d's call to %s failed", + (Int)xe->XE.PthAPIerror.thr->errmsg_index, + xe->XE.PthAPIerror.fnname); + VG_(message)(Vg_UserMsg, + " with error code %ld (%s)", + xe->XE.PthAPIerror.err, + xe->XE.PthAPIerror.errstr); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + break; + } + + case XE_UnlockBogus: { + tl_assert(xe); + tl_assert( HG_(is_sane_Thread)( xe->XE.UnlockBogus.thr ) ); + announce_one_thread( xe->XE.UnlockBogus.thr ); + VG_(message)(Vg_UserMsg, + "Thread #%d unlocked an invalid lock at %p ", + (Int)xe->XE.UnlockBogus.thr->errmsg_index, + (void*)xe->XE.UnlockBogus.lock_ga); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + break; + } + + case XE_UnlockForeign: { + tl_assert(xe); + tl_assert( HG_(is_sane_LockP)( xe->XE.UnlockForeign.lock ) ); + tl_assert( HG_(is_sane_Thread)( xe->XE.UnlockForeign.owner ) ); + tl_assert( HG_(is_sane_Thread)( xe->XE.UnlockForeign.thr ) ); + announce_one_thread( xe->XE.UnlockForeign.thr ); + announce_one_thread( xe->XE.UnlockForeign.owner ); + VG_(message)(Vg_UserMsg, + "Thread #%d unlocked lock at %p " + "currently held by thread #%d", + (Int)xe->XE.UnlockForeign.thr->errmsg_index, + (void*)xe->XE.UnlockForeign.lock->guestaddr, + (Int)xe->XE.UnlockForeign.owner->errmsg_index ); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + if (xe->XE.UnlockForeign.lock->appeared_at) { + VG_(message)(Vg_UserMsg, + " Lock at %p was first observed", + (void*)xe->XE.UnlockForeign.lock->guestaddr); + VG_(pp_ExeContext)( xe->XE.UnlockForeign.lock->appeared_at ); + } + break; + } + + case XE_UnlockUnlocked: { + tl_assert(xe); + tl_assert( HG_(is_sane_LockP)( xe->XE.UnlockUnlocked.lock ) ); + tl_assert( HG_(is_sane_Thread)( xe->XE.UnlockUnlocked.thr ) ); + announce_one_thread( xe->XE.UnlockUnlocked.thr ); + VG_(message)(Vg_UserMsg, + "Thread #%d unlocked a not-locked lock at %p ", + (Int)xe->XE.UnlockUnlocked.thr->errmsg_index, + (void*)xe->XE.UnlockUnlocked.lock->guestaddr); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + if (xe->XE.UnlockUnlocked.lock->appeared_at) { + VG_(message)(Vg_UserMsg, + " Lock at %p was first observed", + (void*)xe->XE.UnlockUnlocked.lock->guestaddr); + VG_(pp_ExeContext)( xe->XE.UnlockUnlocked.lock->appeared_at ); + } + break; + } + + case XE_FreeMemLock: { + tl_assert(xe); + tl_assert( HG_(is_sane_LockP)( xe->XE.FreeMemLock.lock ) ); + tl_assert( HG_(is_sane_Thread)( xe->XE.FreeMemLock.thr ) ); + announce_one_thread( xe->XE.FreeMemLock.thr ); + VG_(message)(Vg_UserMsg, + "Thread #%d deallocated location %p " + "containing a locked lock", + (Int)xe->XE.FreeMemLock.thr->errmsg_index, + (void*)xe->XE.FreeMemLock.lock->guestaddr); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + if (xe->XE.FreeMemLock.lock->appeared_at) { + VG_(message)(Vg_UserMsg, + " Lock at %p was first observed", + (void*)xe->XE.FreeMemLock.lock->guestaddr); + VG_(pp_ExeContext)( xe->XE.FreeMemLock.lock->appeared_at ); + } + break; + } + + case XE_Race: { + Addr err_ga; + HChar* what; + Int szB; + what = xe->XE.Race.isWrite ? "write" : "read"; + szB = xe->XE.Race.szB; + err_ga = VG_(get_error_address)(err); + + announce_one_thread( xe->XE.Race.thr ); + if (xe->XE.Race.mb_confaccthr) + announce_one_thread( xe->XE.Race.mb_confaccthr ); + VG_(message)(Vg_UserMsg, + "Possible data race during %s of size %d at %#lx by thread #%d", + what, szB, err_ga, (Int)xe->XE.Race.thr->errmsg_index + ); + VG_(pp_ExeContext)( VG_(get_error_where)(err) ); + if (xe->XE.Race.mb_confacc) { + if (xe->XE.Race.mb_confaccthr) { + VG_(message)(Vg_UserMsg, + " This conflicts with a previous %s of size %d by thread #%d", + xe->XE.Race.mb_confaccIsW ? "write" : "read", + xe->XE.Race.mb_confaccSzB, + xe->XE.Race.mb_confaccthr->errmsg_index + ); + } else { + // FIXME: can this ever happen? + VG_(message)(Vg_UserMsg, + " This conflicts with a previous %s of size %d", + xe->XE.Race.mb_confaccIsW ? "write" : "read", + xe->XE.Race.mb_confaccSzB + ); + } + VG_(pp_ExeContext)( xe->XE.Race.mb_confacc ); + } + + + /* If we have a better description of the address, show it. */ + if (xe->XE.Race.descr1[0] != 0) + VG_(message)(Vg_UserMsg, " %s", &xe->XE.Race.descr1[0]); + if (xe->XE.Race.descr2[0] != 0) + VG_(message)(Vg_UserMsg, " %s", &xe->XE.Race.descr2[0]); + + break; /* case XE_Race */ + } /* case XE_Race */ + + default: + tl_assert(0); + } /* switch (VG_(get_error_kind)(err)) */ +} + +Char* HG_(get_error_name) ( Error* err ) +{ + switch (VG_(get_error_kind)(err)) { + case XE_Race: return "Race"; + case XE_FreeMemLock: return "FreeMemLock"; + case XE_UnlockUnlocked: return "UnlockUnlocked"; + case XE_UnlockForeign: return "UnlockForeign"; + case XE_UnlockBogus: return "UnlockBogus"; + case XE_PthAPIerror: return "PthAPIerror"; + case XE_LockOrder: return "LockOrder"; + case XE_Misc: return "Misc"; + default: tl_assert(0); /* fill in missing case */ + } +} + +Bool HG_(recognised_suppression) ( Char* name, Supp *su ) +{ +# define TRY(_name,_xskind) \ + if (0 == VG_(strcmp)(name, (_name))) { \ + VG_(set_supp_kind)(su, (_xskind)); \ + return True; \ + } + TRY("Race", XS_Race); + TRY("FreeMemLock", XS_FreeMemLock); + TRY("UnlockUnlocked", XS_UnlockUnlocked); + TRY("UnlockForeign", XS_UnlockForeign); + TRY("UnlockBogus", XS_UnlockBogus); + TRY("PthAPIerror", XS_PthAPIerror); + TRY("LockOrder", XS_LockOrder); + TRY("Misc", XS_Misc); + return False; +# undef TRY +} + +Bool HG_(read_extra_suppression_info) ( Int fd, Char* buf, Int nBuf, + Supp* su ) +{ + /* do nothing -- no extra suppression info present. Return True to + indicate nothing bad happened. */ + return True; +} + +Bool HG_(error_matches_suppression) ( Error* err, Supp* su ) +{ + switch (VG_(get_supp_kind)(su)) { + case XS_Race: return VG_(get_error_kind)(err) == XE_Race; + case XS_FreeMemLock: return VG_(get_error_kind)(err) == XE_FreeMemLock; + case XS_UnlockUnlocked: return VG_(get_error_kind)(err) == XE_UnlockUnlocked; + case XS_UnlockForeign: return VG_(get_error_kind)(err) == XE_UnlockForeign; + case XS_UnlockBogus: return VG_(get_error_kind)(err) == XE_UnlockBogus; + case XS_PthAPIerror: return VG_(get_error_kind)(err) == XE_PthAPIerror; + case XS_LockOrder: return VG_(get_error_kind)(err) == XE_LockOrder; + case XS_Misc: return VG_(get_error_kind)(err) == XE_Misc; + //case XS_: return VG_(get_error_kind)(err) == XE_; + default: tl_assert(0); /* fill in missing cases */ + } +} + +void HG_(print_extra_suppression_info) ( Error* err ) +{ + /* Do nothing */ +} + + +/*--------------------------------------------------------------------*/ +/*--- end hg_errors.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/hg_errors.h b/helgrind/hg_errors.h new file mode 100644 index 0000000..a45173a --- /dev/null +++ b/helgrind/hg_errors.h @@ -0,0 +1,71 @@ + +/*--------------------------------------------------------------------*/ +/*--- Error management for Helgrind. ---*/ +/*--- hg_errors.h ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#ifndef __HG_ERRORS_H +#define __HG_ERRORS_H + + +/* The standard bundle of error management functions that we are +required to present to the core/tool interface at startup. */ +Bool HG_(eq_Error) ( VgRes not_used, Error* e1, Error* e2 ); +void HG_(pp_Error) ( Error* err ); +UInt HG_(update_extra) ( Error* err ); +Bool HG_(recognised_suppression) ( Char* name, Supp *su ); +Bool HG_(read_extra_suppression_info) ( Int fd, Char* buf, Int nBuf, + Supp* su ); +Bool HG_(error_matches_suppression) ( Error* err, Supp* su ); +Char* HG_(get_error_name) ( Error* err ); +void HG_(print_extra_suppression_info) ( Error* err ); + +/* Functions for recording various kinds of errors. */ +void HG_(record_error_Race) ( Thread* thr, + Addr data_addr, Int szB, Bool isWrite, + ExeContext* mb_lastlock ); +void HG_(record_error_FreeMemLock) ( Thread* thr, Lock* lk ); +void HG_(record_error_UnlockUnlocked) ( Thread*, Lock* ); +void HG_(record_error_UnlockForeign) ( Thread*, Thread*, Lock* ); +void HG_(record_error_UnlockBogus) ( Thread*, Addr ); +void HG_(record_error_PthAPIerror) ( Thread*, HChar*, Word, HChar* ); +void HG_(record_error_LockOrder) ( Thread*, Addr, Addr, + ExeContext*, ExeContext* ); +void HG_(record_error_Misc) ( Thread*, HChar* ); + +/* Statistics pertaining to error management. */ +extern ULong HG_(stats__LockN_to_P_queries); +extern ULong HG_(stats__LockN_to_P_get_map_size) ( void ); +extern ULong HG_(stats__string_table_queries); +extern ULong HG_(stats__string_table_get_map_size) ( void ); + +#endif /* ! __HG_ERRORS_H */ + +/*--------------------------------------------------------------------*/ +/*--- end hg_errors.h ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c new file mode 100644 index 0000000..c2ea907 --- /dev/null +++ b/helgrind/hg_intercepts.c @@ -0,0 +1,1734 @@ + +/*--------------------------------------------------------------------*/ +/*--- pthread intercepts for thread checking. ---*/ +/*--- tc_intercepts.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks LLP + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. + + Neither the names of the U.S. Department of Energy nor the + University of California nor the names of its contributors may be + used to endorse or promote products derived from this software + without prior written permission. +*/ + +/* RUNS ON SIMULATED CPU + Interceptors for pthread_* functions, so that tc_main can see + significant thread events. + + Important: when adding a function wrapper to this file, remember to + add a test case to tc20_verifywrap.c. A common cause of failure is + for wrappers to not engage on different distros, and + tc20_verifywrap essentially checks that each wrapper is really + doing something. +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_redir.h" +#include "valgrind.h" +#include "helgrind.h" + +#define TRACE_PTH_FNS 0 +#define TRACE_QT4_FNS 0 + + +/*----------------------------------------------------------------*/ +/*--- ---*/ +/*----------------------------------------------------------------*/ + +#define PTH_FUNC(ret_ty, f, args...) \ + ret_ty I_WRAP_SONAME_FNNAME_ZZ(libpthreadZdsoZd0,f)(args); \ + ret_ty I_WRAP_SONAME_FNNAME_ZZ(libpthreadZdsoZd0,f)(args) + +// Do a client request. This is a macro rather than a function +// so as to avoid having an extra function in the stack trace. + +#define DO_CREQ_v_W(_creqF, _ty1F,_arg1F) \ + do { \ + Word _unused_res, _arg1; \ + assert(sizeof(_ty1F) == sizeof(Word)); \ + _arg1 = (Word)(_arg1F); \ + VALGRIND_DO_CLIENT_REQUEST(_unused_res, 0, \ + (_creqF), \ + _arg1, 0,0,0,0); \ + } while (0) + +#define DO_CREQ_v_WW(_creqF, _ty1F,_arg1F, _ty2F,_arg2F) \ + do { \ + Word _unused_res, _arg1, _arg2; \ + assert(sizeof(_ty1F) == sizeof(Word)); \ + assert(sizeof(_ty2F) == sizeof(Word)); \ + _arg1 = (Word)(_arg1F); \ + _arg2 = (Word)(_arg2F); \ + VALGRIND_DO_CLIENT_REQUEST(_unused_res, 0, \ + (_creqF), \ + _arg1,_arg2,0,0,0); \ + } while (0) + +#define DO_CREQ_W_WW(_resF, _creqF, _ty1F,_arg1F, _ty2F,_arg2F) \ + do { \ + Word _res, _arg1, _arg2; \ + assert(sizeof(_ty1F) == sizeof(Word)); \ + assert(sizeof(_ty2F) == sizeof(Word)); \ + _arg1 = (Word)(_arg1F); \ + _arg2 = (Word)(_arg2F); \ + VALGRIND_DO_CLIENT_REQUEST(_res, 2, \ + (_creqF), \ + _arg1,_arg2,0,0,0); \ + _resF = _res; \ + } while (0) + +#define DO_CREQ_v_WWW(_creqF, _ty1F,_arg1F, \ + _ty2F,_arg2F, _ty3F, _arg3F) \ + do { \ + Word _unused_res, _arg1, _arg2, _arg3; \ + assert(sizeof(_ty1F) == sizeof(Word)); \ + assert(sizeof(_ty2F) == sizeof(Word)); \ + assert(sizeof(_ty3F) == sizeof(Word)); \ + _arg1 = (Word)(_arg1F); \ + _arg2 = (Word)(_arg2F); \ + _arg3 = (Word)(_arg3F); \ + VALGRIND_DO_CLIENT_REQUEST(_unused_res, 0, \ + (_creqF), \ + _arg1,_arg2,_arg3,0,0); \ + } while (0) + + +#define DO_PthAPIerror(_fnnameF, _errF) \ + do { \ + char* _fnname = (char*)(_fnnameF); \ + long _err = (long)(int)(_errF); \ + char* _errstr = lame_strerror(_err); \ + DO_CREQ_v_WWW(_VG_USERREQ__HG_PTH_API_ERROR, \ + char*,_fnname, \ + long,_err, char*,_errstr); \ + } while (0) + + +/* Needed for older glibcs (2.3 and older, at least) who don't + otherwise "know" about pthread_rwlock_anything or about + PTHREAD_MUTEX_RECURSIVE (amongst things). */ +#define _GNU_SOURCE 1 + +#include <stdio.h> +#include <assert.h> +#include <errno.h> +#include <pthread.h> + + +/* A lame version of strerror which doesn't use the real libc + strerror_r, since using the latter just generates endless more + threading errors (glibc goes off and does tons of crap w.r.t. + locales etc) */ +static char* lame_strerror ( long err ) +{ switch (err) { + case EPERM: return "EPERM: Operation not permitted"; + case ENOENT: return "ENOENT: No such file or directory"; + case ESRCH: return "ESRCH: No such process"; + case EINTR: return "EINTR: Interrupted system call"; + case EBADF: return "EBADF: Bad file number"; + case EAGAIN: return "EAGAIN: Try again"; + case ENOMEM: return "ENOMEM: Out of memory"; + case EACCES: return "EACCES: Permission denied"; + case EFAULT: return "EFAULT: Bad address"; + case EEXIST: return "EEXIST: File exists"; + case EINVAL: return "EINVAL: Invalid argument"; + case EMFILE: return "EMFILE: Too many open files"; + case ENOSYS: return "ENOSYS: Function not implemented"; + case EOVERFLOW: return "EOVERFLOW: Value too large " + "for defined data type"; + case EBUSY: return "EBUSY: Device or resource busy"; + case ETIMEDOUT: return "ETIMEDOUT: Connection timed out"; + case EDEADLK: return "EDEADLK: Resource deadlock would occur"; + case EOPNOTSUPP: return "EOPNOTSUPP: Operation not supported on " + "transport endpoint"; /* honest, guv */ + default: return "tc_intercepts.c: lame_strerror(): " + "unhandled case -- please fix me!"; + } +} + + +/*----------------------------------------------------------------*/ +/*--- pthread_create, pthread_join, pthread_exit ---*/ +/*----------------------------------------------------------------*/ + +/* Do not rename this function. It contains an unavoidable race and + so is mentioned by name in glibc-*helgrind*.supp. */ +static void* mythread_wrapper ( void* xargsV ) +{ + volatile Word* xargs = (volatile Word*) xargsV; + void*(*fn)(void*) = (void*(*)(void*))xargs[0]; + void* arg = (void*)xargs[1]; + pthread_t me = pthread_self(); + /* Tell the tool what my pthread_t is. */ + DO_CREQ_v_W(_VG_USERREQ__HG_SET_MY_PTHREAD_T, pthread_t,me); + /* allow the parent to proceed. We can't let it proceed until + we're ready because (1) we need to make sure it doesn't exit and + hence deallocate xargs[] while we still need it, and (2) we + don't want either parent nor child to proceed until the tool has + been notified of the child's pthread_t. */ + xargs[2] = 0; + /* Now we can no longer safely use xargs[]. */ + return (void*) fn( (void*)arg ); +} + +// pthread_create +PTH_FUNC(int, pthreadZucreateZAZa, // pthread_create@* + pthread_t *thread, const pthread_attr_t *attr, + void *(*start) (void *), void *arg) +{ + int ret; + OrigFn fn; + volatile Word xargs[3]; + + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_create wrapper"); fflush(stderr); + } + xargs[0] = (Word)start; + xargs[1] = (Word)arg; + xargs[2] = 1; /* serves as a spinlock -- sigh */ + + CALL_FN_W_WWWW(ret, fn, thread,attr,mythread_wrapper,&xargs[0]); + + if (ret == 0) { + /* we have to wait for the child to notify the tool of its + pthread_t before continuing */ + while (xargs[2] != 0) { + /* Do nothing. We need to spin until the child writes to + xargs[2]. However, that can lead to starvation in the + child and very long delays (eg, tc19_shadowmem on + ppc64-linux Fedora Core 6). So yield the cpu if we can, + to let the child run at the earliest available + opportunity. */ + sched_yield(); + } + } else { + DO_PthAPIerror( "pthread_create", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: pth_create -> %d >>\n", ret); + } + return ret; +} + +// pthread_join +PTH_FUNC(int, pthreadZujoin, // pthread_join + pthread_t thread, void** value_pointer) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_join wrapper"); fflush(stderr); + } + + CALL_FN_W_WW(ret, fn, thread,value_pointer); + + /* At least with NPTL as the thread library, this is safe because + it is guaranteed (by NPTL) that the joiner will completely gone + before pthread_join (the original) returns. See email below.*/ + if (ret == 0 /*success*/) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_JOIN_POST, pthread_t,thread); + } else { + DO_PthAPIerror( "pthread_join", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: pth_join -> %d >>\n", ret); + } + return ret; +} + +/* Behaviour of pthread_join on NPTL: + +Me: +I have a question re the NPTL pthread_join implementation. + + Suppose I am the thread 'stayer'. + + If I call pthread_join(quitter), is it guaranteed that the + thread 'quitter' has really exited before pthread_join returns? + + IOW, is it guaranteed that 'quitter' will not execute any further + instructions after pthread_join returns? + +I believe this is true based on the following analysis of +glibc-2.5 sources. However am not 100% sure and would appreciate +confirmation. + + 'quitter' will be running start_thread() in nptl/pthread_create.c + + The last action of start_thread() is to exit via + __exit_thread_inline(0), which simply does sys_exit + (nptl/pthread_create.c:403) + + 'stayer' meanwhile is waiting for lll_wait_tid (pd->tid) + (call at nptl/pthread_join.c:89) + + As per comment at nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h:536, + lll_wait_tid will not return until kernel notifies via futex + wakeup that 'quitter' has terminated. + + Hence pthread_join cannot return until 'quitter' really has + completely disappeared. + +Drepper: +> As per comment at nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h:536, +> lll_wait_tid will not return until kernel notifies via futex +> wakeup that 'quitter' has terminated. +That's the key. The kernel resets the TID field after the thread is +done. No way the joiner can return before the thread is gone. +*/ + + +/*----------------------------------------------------------------*/ +/*--- pthread_mutex_t functions ---*/ +/*----------------------------------------------------------------*/ + +/* Handled: pthread_mutex_init pthread_mutex_destroy + pthread_mutex_lock + pthread_mutex_trylock pthread_mutex_timedlock + pthread_mutex_unlock + + Unhandled: pthread_spin_init pthread_spin_destroy + pthread_spin_lock + pthread_spin_trylock + pthread_spin_unlock +*/ + +// pthread_mutex_init +PTH_FUNC(int, pthreadZumutexZuinit, // pthread_mutex_init + pthread_mutex_t *mutex, + pthread_mutexattr_t* attr) +{ + int ret; + long mbRec; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_mxinit %p", mutex); fflush(stderr); + } + + mbRec = 0; + if (attr) { + int ty, zzz; + zzz = pthread_mutexattr_gettype(attr, &ty); + if (zzz == 0 && ty == PTHREAD_MUTEX_RECURSIVE) + mbRec = 1; + } + + CALL_FN_W_WW(ret, fn, mutex,attr); + + if (ret == 0 /*success*/) { + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_INIT_POST, + pthread_mutex_t*,mutex, long,mbRec); + } else { + DO_PthAPIerror( "pthread_mutex_init", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: mxinit -> %d >>\n", ret); + } + return ret; +} + + +// pthread_mutex_destroy +PTH_FUNC(int, pthreadZumutexZudestroy, // pthread_mutex_destroy + pthread_mutex_t *mutex) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_mxdestroy %p", mutex); fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_DESTROY_PRE, + pthread_mutex_t*,mutex); + + CALL_FN_W_W(ret, fn, mutex); + + if (ret != 0) { + DO_PthAPIerror( "pthread_mutex_destroy", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: mxdestroy -> %d >>\n", ret); + } + return ret; +} + + +// pthread_mutex_lock +PTH_FUNC(int, pthreadZumutexZulock, // pthread_mutex_lock + pthread_mutex_t *mutex) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_mxlock %p", mutex); fflush(stderr); + } + + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, + pthread_mutex_t*,mutex, long,0/*!isTryLock*/); + + CALL_FN_W_W(ret, fn, mutex); + + /* There's a hole here: libpthread now knows the lock is locked, + but the tool doesn't, so some other thread could run and detect + that the lock has been acquired by someone (this thread). Does + this matter? Not sure, but I don't think so. */ + + if (ret == 0 /*success*/) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + pthread_mutex_t*,mutex); + } else { + DO_PthAPIerror( "pthread_mutex_lock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: mxlock -> %d >>\n", ret); + } + return ret; +} + + +// pthread_mutex_trylock. The handling needed here is very similar +// to that for pthread_mutex_lock, except that we need to tell +// the pre-lock creq that this is a trylock-style operation, and +// therefore not to complain if the lock is nonrecursive and +// already locked by this thread -- because then it'll just fail +// immediately with EBUSY. +PTH_FUNC(int, pthreadZumutexZutrylock, // pthread_mutex_trylock + pthread_mutex_t *mutex) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_mxtrylock %p", mutex); fflush(stderr); + } + + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, + pthread_mutex_t*,mutex, long,1/*isTryLock*/); + + CALL_FN_W_W(ret, fn, mutex); + + /* There's a hole here: libpthread now knows the lock is locked, + but the tool doesn't, so some other thread could run and detect + that the lock has been acquired by someone (this thread). Does + this matter? Not sure, but I don't think so. */ + + if (ret == 0 /*success*/) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + pthread_mutex_t*,mutex); + } else { + if (ret != EBUSY) + DO_PthAPIerror( "pthread_mutex_trylock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: mxtrylock -> %d >>\n", ret); + } + return ret; +} + + +// pthread_mutex_timedlock. Identical logic to pthread_mutex_trylock. +PTH_FUNC(int, pthreadZumutexZutimedlock, // pthread_mutex_timedlock + pthread_mutex_t *mutex, + void* timeout) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_mxtimedlock %p %p", mutex, timeout); + fflush(stderr); + } + + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, + pthread_mutex_t*,mutex, long,1/*isTryLock-ish*/); + + CALL_FN_W_WW(ret, fn, mutex,timeout); + + /* There's a hole here: libpthread now knows the lock is locked, + but the tool doesn't, so some other thread could run and detect + that the lock has been acquired by someone (this thread). Does + this matter? Not sure, but I don't think so. */ + + if (ret == 0 /*success*/) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + pthread_mutex_t*,mutex); + } else { + if (ret != ETIMEDOUT) + DO_PthAPIerror( "pthread_mutex_timedlock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: mxtimedlock -> %d >>\n", ret); + } + return ret; +} + + +// pthread_mutex_unlock +PTH_FUNC(int, pthreadZumutexZuunlock, // pthread_mutex_unlock + pthread_mutex_t *mutex) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_mxunlk %p", mutex); fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_PRE, + pthread_mutex_t*,mutex); + + CALL_FN_W_W(ret, fn, mutex); + + if (ret == 0 /*success*/) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_POST, + pthread_mutex_t*,mutex); + } else { + DO_PthAPIerror( "pthread_mutex_unlock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " mxunlk -> %d >>\n", ret); + } + return ret; +} + + +/*----------------------------------------------------------------*/ +/*--- pthread_cond_t functions ---*/ +/*----------------------------------------------------------------*/ + +/* Handled: pthread_cond_wait pthread_cond_timedwait + pthread_cond_signal pthread_cond_broadcast + pthread_cond_destroy + + Unhandled: pthread_cond_init + -- is this important? +*/ + +// pthread_cond_wait +PTH_FUNC(int, pthreadZucondZuwaitZAZa, // pthread_cond_wait@* + pthread_cond_t* cond, pthread_mutex_t* mutex) +{ + int ret; + OrigFn fn; + unsigned long mutex_is_valid; + + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_cond_wait %p %p", cond, mutex); + fflush(stderr); + } + + /* Tell the tool a cond-wait is about to happen, so it can check + for bogus argument values. In return it tells us whether it + thinks the mutex is valid or not. */ + DO_CREQ_W_WW(mutex_is_valid, + _VG_USERREQ__HG_PTHREAD_COND_WAIT_PRE, + pthread_cond_t*,cond, pthread_mutex_t*,mutex); + assert(mutex_is_valid == 1 || mutex_is_valid == 0); + + /* Tell the tool we're about to drop the mutex. This reflects the + fact that in a cond_wait, we show up holding the mutex, and the + call atomically drops the mutex and waits for the cv to be + signalled. */ + if (mutex_is_valid) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_PRE, + pthread_mutex_t*,mutex); + } + + CALL_FN_W_WW(ret, fn, cond,mutex); + + /* these conditionals look stupid, but compare w/ same logic for + pthread_cond_timedwait below */ + if (ret == 0 && mutex_is_valid) { + /* and now we have the mutex again */ + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + pthread_mutex_t*,mutex); + } + + if (ret == 0 && mutex_is_valid) { + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_COND_WAIT_POST, + pthread_cond_t*,cond, pthread_mutex_t*,mutex); + } + + if (ret != 0) { + DO_PthAPIerror( "pthread_cond_wait", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " cowait -> %d >>\n", ret); + } + + return ret; +} + + +// pthread_cond_timedwait +PTH_FUNC(int, pthreadZucondZutimedwaitZAZa, // pthread_cond_timedwait@* + pthread_cond_t* cond, pthread_mutex_t* mutex, + struct timespec* abstime) +{ + int ret; + OrigFn fn; + unsigned long mutex_is_valid; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_cond_timedwait %p %p %p", + cond, mutex, abstime); + fflush(stderr); + } + + /* Tell the tool a cond-wait is about to happen, so it can check + for bogus argument values. In return it tells us whether it + thinks the mutex is valid or not. */ + DO_CREQ_W_WW(mutex_is_valid, + _VG_USERREQ__HG_PTHREAD_COND_WAIT_PRE, + pthread_cond_t*,cond, pthread_mutex_t*,mutex); + assert(mutex_is_valid == 1 || mutex_is_valid == 0); + + /* Tell the tool we're about to drop the mutex. This reflects the + fact that in a cond_wait, we show up holding the mutex, and the + call atomically drops the mutex and waits for the cv to be + signalled. */ + if (mutex_is_valid) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_PRE, + pthread_mutex_t*,mutex); + } + + CALL_FN_W_WWW(ret, fn, cond,mutex,abstime); + + if ((ret == 0 || ret == ETIMEDOUT) && mutex_is_valid) { + /* and now we have the mutex again */ + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + pthread_mutex_t*,mutex); + } + + if (ret == 0 && mutex_is_valid) { + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_COND_WAIT_POST, + pthread_cond_t*,cond, pthread_mutex_t*,mutex); + } + + if (ret != 0 && ret != ETIMEDOUT) { + DO_PthAPIerror( "pthread_cond_timedwait", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " cotimedwait -> %d >>\n", ret); + } + + return ret; +} + + +// pthread_cond_signal +PTH_FUNC(int, pthreadZucondZusignalZAZa, // pthread_cond_signal@* + pthread_cond_t* cond) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_cond_signal %p", cond); + fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_COND_SIGNAL_PRE, + pthread_cond_t*,cond); + + CALL_FN_W_W(ret, fn, cond); + + if (ret != 0) { + DO_PthAPIerror( "pthread_cond_signal", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " cosig -> %d >>\n", ret); + } + + return ret; +} + + +// pthread_cond_broadcast +// Note, this is pretty much identical, from a dependency-graph +// point of view, with cond_signal, so the code is duplicated. +// Maybe it should be commoned up. +PTH_FUNC(int, pthreadZucondZubroadcastZAZa, // pthread_cond_broadcast@* + pthread_cond_t* cond) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_broadcast_signal %p", cond); + fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_COND_BROADCAST_PRE, + pthread_cond_t*,cond); + + CALL_FN_W_W(ret, fn, cond); + + if (ret != 0) { + DO_PthAPIerror( "pthread_cond_broadcast", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " cobro -> %d >>\n", ret); + } + + return ret; +} + + +// pthread_cond_destroy +PTH_FUNC(int, pthreadZucondZudestroyZAZa, // pthread_cond_destroy@* + pthread_cond_t* cond) +{ + int ret; + OrigFn fn; + + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_cond_destroy %p", cond); + fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_COND_DESTROY_PRE, + pthread_cond_t*,cond); + + CALL_FN_W_W(ret, fn, cond); + + if (ret != 0) { + DO_PthAPIerror( "pthread_cond_destroy", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " codestr -> %d >>\n", ret); + } + + return ret; +} + + +/*----------------------------------------------------------------*/ +/*--- pthread_barrier_t functions ---*/ +/*----------------------------------------------------------------*/ + +/* Handled: pthread_barrier_init + pthread_barrier_wait + pthread_barrier_destroy + + Unhandled: pthread_barrierattr_destroy + pthread_barrierattr_getpshared + pthread_barrierattr_init + pthread_barrierattr_setpshared + -- are these important? +*/ + +PTH_FUNC(int, pthreadZubarrierZuinit, // pthread_barrier_init + pthread_barrier_t* bar, + pthread_barrierattr_t* attr, unsigned long count) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_barrier_init %p %p %lu", + bar, attr, count); + fflush(stderr); + } + + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_BARRIER_INIT_PRE, + pthread_barrier_t*,bar, + unsigned long,count); + + CALL_FN_W_WWW(ret, fn, bar,attr,count); + + if (ret != 0) { + DO_PthAPIerror( "pthread_barrier_init", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " pthread_barrier_init -> %d >>\n", ret); + } + + return ret; +} + + +PTH_FUNC(int, pthreadZubarrierZuwait, // pthread_barrier_wait + pthread_barrier_t* bar) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_barrier_wait %p", bar); + fflush(stderr); + } + + /* That this works correctly, and doesn't screw up when a thread + leaving the barrier races round to the front and re-enters while + other threads are still leaving it, is quite subtle. See + comments in the handler for PTHREAD_BARRIER_WAIT_PRE in + hg_main.c. */ + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_BARRIER_WAIT_PRE, + pthread_barrier_t*,bar); + + CALL_FN_W_W(ret, fn, bar); + + if (ret != 0 && ret != PTHREAD_BARRIER_SERIAL_THREAD) { + DO_PthAPIerror( "pthread_barrier_wait", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " pthread_barrier_wait -> %d >>\n", ret); + } + + return ret; +} + + +PTH_FUNC(int, pthreadZubarrierZudestroy, // pthread_barrier_destroy + pthread_barrier_t* bar) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_barrier_destroy %p", bar); + fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_BARRIER_DESTROY_PRE, + pthread_barrier_t*,bar); + + CALL_FN_W_W(ret, fn, bar); + + if (ret != 0) { + DO_PthAPIerror( "pthread_barrier_destroy", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " pthread_barrier_destroy -> %d >>\n", ret); + } + + return ret; +} + +/*----------------------------------------------------------------*/ +/*--- pthread_rwlock_t functions ---*/ +/*----------------------------------------------------------------*/ + +/* Handled: pthread_rwlock_init pthread_rwlock_destroy + pthread_rwlock_rdlock + pthread_rwlock_wrlock + pthread_rwlock_unlock + + Unhandled: pthread_rwlock_timedrdlock + pthread_rwlock_tryrdlock + + pthread_rwlock_timedwrlock + pthread_rwlock_trywrlock +*/ + +// pthread_rwlock_init +PTH_FUNC(int, pthreadZurwlockZuinit, // pthread_rwlock_init + pthread_rwlock_t *rwl, + pthread_rwlockattr_t* attr) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_rwl_init %p", rwl); fflush(stderr); + } + + CALL_FN_W_WW(ret, fn, rwl,attr); + + if (ret == 0 /*success*/) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_RWLOCK_INIT_POST, + pthread_rwlock_t*,rwl); + } else { + DO_PthAPIerror( "pthread_rwlock_init", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: rwl_init -> %d >>\n", ret); + } + return ret; +} + + +// pthread_rwlock_destroy +PTH_FUNC(int, pthreadZurwlockZudestroy, // pthread_rwlock_destroy + pthread_rwlock_t *rwl) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_rwl_destroy %p", rwl); fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_RWLOCK_DESTROY_PRE, + pthread_rwlock_t*,rwl); + + CALL_FN_W_W(ret, fn, rwl); + + if (ret != 0) { + DO_PthAPIerror( "pthread_rwlock_destroy", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: rwl_destroy -> %d >>\n", ret); + } + return ret; +} + + +// pthread_rwlock_wrlock +PTH_FUNC(int, pthreadZurwlockZuwrlock, // pthread_rwlock_wrlock + pthread_rwlock_t* rwlock) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_rwl_wlk %p", rwlock); fflush(stderr); + } + + DO_CREQ_v_WWW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE, + pthread_rwlock_t*,rwlock, + long,1/*isW*/, long,0/*!isTryLock*/); + + CALL_FN_W_W(ret, fn, rwlock); + + if (ret == 0 /*success*/) { + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST, + pthread_rwlock_t*,rwlock, long,1/*isW*/); + } else { + DO_PthAPIerror( "pthread_rwlock_wrlock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: rwl_wlk -> %d >>\n", ret); + } + return ret; +} + + +// pthread_rwlock_rdlock +PTH_FUNC(int, pthreadZurwlockZurdlock, // pthread_rwlock_rdlock + pthread_rwlock_t* rwlock) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_rwl_rlk %p", rwlock); fflush(stderr); + } + + DO_CREQ_v_WWW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE, + pthread_rwlock_t*,rwlock, + long,0/*!isW*/, long,0/*!isTryLock*/); + + CALL_FN_W_W(ret, fn, rwlock); + + if (ret == 0 /*success*/) { + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST, + pthread_rwlock_t*,rwlock, long,0/*!isW*/); + } else { + DO_PthAPIerror( "pthread_rwlock_rdlock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: rwl_rlk -> %d >>\n", ret); + } + return ret; +} + + +// pthread_rwlock_trywrlock +PTH_FUNC(int, pthreadZurwlockZutrywrlock, // pthread_rwlock_trywrlock + pthread_rwlock_t* rwlock) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_rwl_trywlk %p", rwlock); fflush(stderr); + } + + DO_CREQ_v_WWW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE, + pthread_rwlock_t*,rwlock, + long,1/*isW*/, long,1/*isTryLock*/); + + CALL_FN_W_W(ret, fn, rwlock); + + /* There's a hole here: libpthread now knows the lock is locked, + but the tool doesn't, so some other thread could run and detect + that the lock has been acquired by someone (this thread). Does + this matter? Not sure, but I don't think so. */ + + if (ret == 0 /*success*/) { + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST, + pthread_rwlock_t*,rwlock, long,1/*isW*/); + } else { + if (ret != EBUSY) + DO_PthAPIerror( "pthread_rwlock_trywrlock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: rwl_trywlk -> %d >>\n", ret); + } + return ret; +} + + +// pthread_rwlock_tryrdlock +PTH_FUNC(int, pthreadZurwlockZutryrdlock, // pthread_rwlock_tryrdlock + pthread_rwlock_t* rwlock) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_rwl_tryrlk %p", rwlock); fflush(stderr); + } + + DO_CREQ_v_WWW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE, + pthread_rwlock_t*,rwlock, + long,0/*!isW*/, long,1/*isTryLock*/); + + CALL_FN_W_W(ret, fn, rwlock); + + /* There's a hole here: libpthread now knows the lock is locked, + but the tool doesn't, so some other thread could run and detect + that the lock has been acquired by someone (this thread). Does + this matter? Not sure, but I don't think so. */ + + if (ret == 0 /*success*/) { + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST, + pthread_rwlock_t*,rwlock, long,0/*!isW*/); + } else { + if (ret != EBUSY) + DO_PthAPIerror( "pthread_rwlock_tryrdlock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: rwl_tryrlk -> %d >>\n", ret); + } + return ret; +} + + +// pthread_rwlock_unlock +PTH_FUNC(int, pthreadZurwlockZuunlock, // pthread_rwlock_unlock + pthread_rwlock_t* rwlock) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_PTH_FNS) { + fprintf(stderr, "<< pthread_rwl_unlk %p", rwlock); fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_PRE, + pthread_rwlock_t*,rwlock); + + CALL_FN_W_W(ret, fn, rwlock); + + if (ret == 0 /*success*/) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_POST, + pthread_rwlock_t*,rwlock); + } else { + DO_PthAPIerror( "pthread_rwlock_unlock", ret ); + } + + if (TRACE_PTH_FNS) { + fprintf(stderr, " :: rwl_unlk -> %d >>\n", ret); + } + return ret; +} + + +/*----------------------------------------------------------------*/ +/*--- POSIX semaphores ---*/ +/*----------------------------------------------------------------*/ + +#include <semaphore.h> + +#define TRACE_SEM_FNS 0 + +/* Handled: + int sem_init(sem_t *sem, int pshared, unsigned value); + int sem_destroy(sem_t *sem); + int sem_wait(sem_t *sem); + int sem_post(sem_t *sem); + + Unhandled: + int sem_trywait(sem_t *sem); + int sem_timedwait(sem_t *restrict sem, + const struct timespec *restrict abs_timeout); +*/ + +/* glibc-2.5 has sem_init@@GLIBC_2.2.5 (amd64-linux) + and sem_init@@GLIBC_2.1 (x86-linux): match sem_init@* */ +PTH_FUNC(int, semZuinitZAZa, sem_t* sem, int pshared, unsigned long value) +{ + OrigFn fn; + int ret; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_SEM_FNS) { + fprintf(stderr, "<< sem_init(%p,%d,%lu) ", sem,pshared,value); + fflush(stderr); + } + + CALL_FN_W_WWW(ret, fn, sem,pshared,value); + + if (ret == 0) { + DO_CREQ_v_WW(_VG_USERREQ__HG_POSIX_SEM_INIT_POST, + sem_t*, sem, unsigned long, value); + } else { + DO_PthAPIerror( "sem_init", errno ); + } + + if (TRACE_SEM_FNS) { + fprintf(stderr, " sem_init -> %d >>\n", ret); + fflush(stderr); + } + + return ret; +} + + +/* glibc-2.5 has sem_destroy@@GLIBC_2.2.5 (amd64-linux) + and sem_destroy@@GLIBC_2.1 (x86-linux); match sem_destroy@* */ +PTH_FUNC(int, semZudestroyZAZa, sem_t* sem) +{ + OrigFn fn; + int ret; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_SEM_FNS) { + fprintf(stderr, "<< sem_destroy(%p) ", sem); + fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_POSIX_SEM_DESTROY_PRE, sem_t*, sem); + + CALL_FN_W_W(ret, fn, sem); + + if (ret != 0) { + DO_PthAPIerror( "sem_destroy", errno ); + } + + if (TRACE_SEM_FNS) { + fprintf(stderr, " sem_destroy -> %d >>\n", ret); + fflush(stderr); + } + + return ret; +} + + +/* glibc-2.5 has sem_wait (amd64-linux); match sem_wait + and sem_wait@@GLIBC_2.1 (x86-linux); match sem_wait@* */ +/* wait: decrement semaphore - acquire lockage */ +static int sem_wait_WRK(sem_t* sem) +{ + OrigFn fn; + int ret; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_SEM_FNS) { + fprintf(stderr, "<< sem_wait(%p) ", sem); + fflush(stderr); + } + + CALL_FN_W_W(ret, fn, sem); + + if (ret == 0) { + DO_CREQ_v_W(_VG_USERREQ__HG_POSIX_SEM_WAIT_POST, sem_t*,sem); + } else { + DO_PthAPIerror( "sem_wait", errno ); + } + + if (TRACE_SEM_FNS) { + fprintf(stderr, " sem_wait -> %d >>\n", ret); + fflush(stderr); + } + + return ret; +} +PTH_FUNC(int, semZuwait, sem_t* sem) { /* sem_wait */ + return sem_wait_WRK(sem); +} +PTH_FUNC(int, semZuwaitZAZa, sem_t* sem) { /* sem_wait@* */ + return sem_wait_WRK(sem); +} + + +/* glibc-2.5 has sem_post (amd64-linux); match sem_post + and sem_post@@GLIBC_2.1 (x86-linux); match sem_post@* */ +/* post: increment semaphore - release lockage */ +static int sem_post_WRK(sem_t* sem) +{ + OrigFn fn; + int ret; + + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_SEM_FNS) { + fprintf(stderr, "<< sem_post(%p) ", sem); + fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_POSIX_SEM_POST_PRE, sem_t*,sem); + + CALL_FN_W_W(ret, fn, sem); + + if (ret != 0) { + DO_PthAPIerror( "sem_post", errno ); + } + + if (TRACE_SEM_FNS) { + fprintf(stderr, " sem_post -> %d >>\n", ret); + fflush(stderr); + } + + return ret; +} +PTH_FUNC(int, semZupost, sem_t* sem) { /* sem_post */ + return sem_post_WRK(sem); +} +PTH_FUNC(int, semZupostZAZa, sem_t* sem) { /* sem_post@* */ + return sem_post_WRK(sem); +} + + + +/*----------------------------------------------------------------*/ +/*--- Qt 4 threading functions (w/ GNU name mangling) ---*/ +/*----------------------------------------------------------------*/ + +/* Handled: + QMutex::lock() + QMutex::unlock() + QMutex::tryLock() + QMutex::tryLock(int) + + QMutex::QMutex(QMutex::RecursionMode) _ZN6QMutexC1ENS_13RecursionModeE + QMutex::QMutex(QMutex::RecursionMode) _ZN6QMutexC2ENS_13RecursionModeE + QMutex::~QMutex() _ZN6QMutexD1Ev + QMutex::~QMutex() _ZN6QMutexD2Ev + + Unhandled: + QReadWriteLock::lockForRead() + QReadWriteLock::lockForWrite() + QReadWriteLock::unlock() + QReadWriteLock::tryLockForRead(int) + QReadWriteLock::tryLockForRead() + QReadWriteLock::tryLockForWrite(int) + QReadWriteLock::tryLockForWrite() + + QWaitCondition::wait(QMutex*, unsigned long) + QWaitCondition::wakeAll() + QWaitCondition::wakeOne() + + QSemaphore::* +*/ +/* More comments, 19 Nov 08, based on assessment of qt-4.5.0TP1, + at least on Unix: + + It's apparently only necessary to intercept QMutex, since that is + not implemented using pthread_mutex_t; instead Qt4 has its own + implementation based on atomics (to check the non-contended case) + and pthread_cond_wait (to wait in the contended case). + + QReadWriteLock is built on top of QMutex, counters, and a wait + queue. So we don't need to handle it specially once QMutex + handling is correct -- presumably the dependencies through QMutex + are sufficient to avoid any false race reports. On the other hand, + it is an open question whether too many dependencies are observed + -- in which case we may miss races (false negatives). I suspect + this is likely to be the case, unfortunately. + + QWaitCondition is built on pthread_cond_t, pthread_mutex_t, QMutex + and QReadWriteLock. Same compositional-correctness justificiation + and limitations as fro QReadWriteLock. + + Ditto QSemaphore (from cursory examination). + + Does it matter that only QMutex is handled directly? Open + question. From testing with drd/tests/qt4_* and with KDE4 apps, it + appears that no false errors are reported; however it is not clear + if this is causing false negatives. + + Another problem with Qt4 is thread exiting. Threads are created + with pthread_create (fine); but they detach and simply exit when + done. There is no use of pthread_join, and the provided + wait-for-a-thread-to-exit mechanism (QThread::wait, I believe) + relies on a system of mutexes and flags. I suspect this also + causes too many dependencies to appear. Consequently H sometimes + fails to detect races at exit in some very short-lived racy + programs, because it appears that a thread can exit _and_ have an + observed dependency edge back to the main thread (presumably) + before the main thread reaps the child (that is, calls + QThread::wait). + + This theory is supported by the observation that if all threads are + made to wait at a pthread_barrier_t immediately before they exit, + then H's detection of races in such programs becomes reliable; + without the barrier, it is varies from run to run, depending + (according to investigation) on whether aforementioned + exit-before-reaping behaviour happens or not. + + Finally, why is it necessary to intercept the QMutex constructors + and destructors? The constructors are intercepted only as a matter + of convenience, so H can print accurate "first observed at" + clauses. However, it is actually necessary to intercept the + destructors (as it is with pthread_mutex_destroy) in order that + locks get removed from LAOG when they are destroyed. +*/ + +// soname is libQtCore.so.4 ; match against libQtCore.so* +#define QT4_FUNC(ret_ty, f, args...) \ + ret_ty I_WRAP_SONAME_FNNAME_ZU(libQtCoreZdsoZa,f)(args); \ + ret_ty I_WRAP_SONAME_FNNAME_ZU(libQtCoreZdsoZa,f)(args) + +// QMutex::lock() +QT4_FUNC(void, _ZN6QMutex4lockEv, void* self) +{ + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_QT4_FNS) { + fprintf(stderr, "<< QMutex::lock %p", self); fflush(stderr); + } + + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, + void*,self, long,0/*!isTryLock*/); + + CALL_FN_v_W(fn, self); + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + void*, self); + + if (TRACE_QT4_FNS) { + fprintf(stderr, " :: Q::lock done >>\n"); + } +} + +// QMutex::unlock() +QT4_FUNC(void, _ZN6QMutex6unlockEv, void* self) +{ + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + if (TRACE_QT4_FNS) { + fprintf(stderr, "<< QMutex::unlock %p", self); fflush(stderr); + } + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_PRE, + void*, self); + + CALL_FN_v_W(fn, self); + + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_POST, + void*, self); + + if (TRACE_QT4_FNS) { + fprintf(stderr, " Q::unlock done >>\n"); + } +} + +// bool QMutex::tryLock() +// using 'long' to mimic C++ 'bool' +QT4_FUNC(long, _ZN6QMutex7tryLockEv, void* self) +{ + OrigFn fn; + long ret; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_QT4_FNS) { + fprintf(stderr, "<< QMutex::tryLock %p", self); fflush(stderr); + } + + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, + void*,self, long,1/*isTryLock*/); + + CALL_FN_W_W(ret, fn, self); + + // assumes that only the low 8 bits of the 'bool' are significant + if (ret & 0xFF) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + void*, self); + } + + if (TRACE_QT4_FNS) { + fprintf(stderr, " :: Q::tryLock -> %lu >>\n", ret); + } + + return ret; +} + +// bool QMutex::tryLock(int) +// using 'long' to mimic C++ 'bool' +QT4_FUNC(long, _ZN6QMutex7tryLockEi, void* self, long arg2) +{ + OrigFn fn; + long ret; + VALGRIND_GET_ORIG_FN(fn); + if (TRACE_QT4_FNS) { + fprintf(stderr, "<< QMutex::tryLock(int) %p %d", self, (int)arg2); + fflush(stderr); + } + + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, + void*,self, long,1/*isTryLock*/); + + CALL_FN_W_WW(ret, fn, self,arg2); + + // assumes that only the low 8 bits of the 'bool' are significant + if (ret & 0xFF) { + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, + void*, self); + } + + if (TRACE_QT4_FNS) { + fprintf(stderr, " :: Q::tryLock(int) -> %lu >>\n", ret); + } + + return ret; +} + + +// It's not really very clear what the args are here. But from +// a bit of dataflow analysis of the generated machine code of +// the original function, it appears this takes two args, and +// returns nothing. Nevertheless preserve return value just in +// case. A bit of debug printing indicates that the first arg +// is that of the mutex and the second is either zero or one, +// probably being the recursion mode, therefore. +// QMutex::QMutex(QMutex::RecursionMode) ("C1ENS" variant) +QT4_FUNC(void*, _ZN6QMutexC1ENS_13RecursionModeE, + void* mutex, + long recmode) +{ + OrigFn fn; + long ret; + VALGRIND_GET_ORIG_FN(fn); + CALL_FN_W_WW(ret, fn, mutex, recmode); + // fprintf(stderr, "QMutex constructor 1: %p <- %p %p\n", ret, arg1, arg2); + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_INIT_POST, + void*,mutex, long,1/*mbRec*/); + return (void*)ret; +} + +// QMutex::~QMutex() ("D1Ev" variant) +QT4_FUNC(void*, _ZN6QMutexD1Ev, void* mutex) +{ + OrigFn fn; + long ret; + VALGRIND_GET_ORIG_FN(fn); + DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_DESTROY_PRE, + void*,mutex); + CALL_FN_W_W(ret, fn, mutex); + return (void*)ret; +} + + +// QMutex::QMutex(QMutex::RecursionMode) ("C2ENS" variant) +QT4_FUNC(void*, _ZN6QMutexC2ENS_13RecursionModeE, + void* mutex, + long recmode) +{ + assert(0); +} + +// QMutex::~QMutex() ("D2Ev" variant) +QT4_FUNC(void*, _ZN6QMutexD2Ev, void* mutex) +{ + assert(0); +} + + +// QReadWriteLock is not intercepted directly. See comments +// above. + +//// QReadWriteLock::lockForRead() +//// _ZN14QReadWriteLock11lockForReadEv == QReadWriteLock::lockForRead() +//QT4_FUNC(void, ZuZZN14QReadWriteLock11lockForReadEv, +// // _ZN14QReadWriteLock11lockForReadEv +// void* self) +//{ +// OrigFn fn; +// VALGRIND_GET_ORIG_FN(fn); +// if (TRACE_QT4_FNS) { +// fprintf(stderr, "<< QReadWriteLock::lockForRead %p", self); +// fflush(stderr); +// } +// +// DO_CREQ_v_WWW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE, +// void*,self, +// long,0/*!isW*/, long,0/*!isTryLock*/); +// +// CALL_FN_v_W(fn, self); +// +// DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST, +// void*,self, long,0/*!isW*/); +// +// if (TRACE_QT4_FNS) { +// fprintf(stderr, " :: Q::lockForRead :: done >>\n"); +// } +//} +// +//// QReadWriteLock::lockForWrite() +//// _ZN14QReadWriteLock12lockForWriteEv == QReadWriteLock::lockForWrite() +//QT4_FUNC(void, ZuZZN14QReadWriteLock12lockForWriteEv, +// // _ZN14QReadWriteLock12lockForWriteEv +// void* self) +//{ +// OrigFn fn; +// VALGRIND_GET_ORIG_FN(fn); +// if (TRACE_QT4_FNS) { +// fprintf(stderr, "<< QReadWriteLock::lockForWrite %p", self); +// fflush(stderr); +// } +// +// DO_CREQ_v_WWW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE, +// void*,self, +// long,1/*isW*/, long,0/*!isTryLock*/); +// +// CALL_FN_v_W(fn, self); +// +// DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST, +// void*,self, long,1/*isW*/); +// +// if (TRACE_QT4_FNS) { +// fprintf(stderr, " :: Q::lockForWrite :: done >>\n"); +// } +//} +// +//// QReadWriteLock::unlock() +//// _ZN14QReadWriteLock6unlockEv == QReadWriteLock::unlock() +//QT4_FUNC(void, ZuZZN14QReadWriteLock6unlockEv, +// // _ZN14QReadWriteLock6unlockEv +// void* self) +//{ +// OrigFn fn; +// VALGRIND_GET_ORIG_FN(fn); +// if (TRACE_QT4_FNS) { +// fprintf(stderr, "<< QReadWriteLock::unlock %p", self); +// fflush(stderr); +// } +// +// DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_PRE, +// void*,self); +// +// CALL_FN_v_W(fn, self); +// +// DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_POST, +// void*,self); +// +// if (TRACE_QT4_FNS) { +// fprintf(stderr, " :: Q::unlock :: done >>\n"); +// } +//} + + +/*----------------------------------------------------------------*/ +/*--- Replacements for basic string functions, that don't ---*/ +/*--- overrun the input arrays. ---*/ +/*----------------------------------------------------------------*/ + +/* Copied verbatim from memcheck/mc_replace_strmem.c. When copying + new functions, please keep them in the same order as they appear in + mc_replace_strmem.c. */ + + +#define STRCHR(soname, fnname) \ + char* VG_REPLACE_FUNCTION_ZU(soname,fnname) ( const char* s, int c ); \ + char* VG_REPLACE_FUNCTION_ZU(soname,fnname) ( const char* s, int c ) \ + { \ + UChar ch = (UChar)((UInt)c); \ + UChar* p = (UChar*)s; \ + while (True) { \ + if (*p == ch) return p; \ + if (*p == 0) return NULL; \ + p++; \ + } \ + } + +// Apparently index() is the same thing as strchr() +STRCHR(VG_Z_LIBC_SONAME, strchr) +STRCHR(VG_Z_LD_LINUX_SO_2, strchr) +STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, strchr) +STRCHR(VG_Z_LIBC_SONAME, index) +STRCHR(VG_Z_LD_LINUX_SO_2, index) +STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, index) + + +// Note that this replacement often doesn't get used because gcc inlines +// calls to strlen() with its own built-in version. This can be very +// confusing if you aren't expecting it. Other small functions in this file +// may also be inline by gcc. +#define STRLEN(soname, fnname) \ + SizeT VG_REPLACE_FUNCTION_ZU(soname,fnname)( const char* str ); \ + SizeT VG_REPLACE_FUNCTION_ZU(soname,fnname)( const char* str ) \ + { \ + SizeT i = 0; \ + while (str[i] != 0) i++; \ + return i; \ + } + +STRLEN(VG_Z_LIBC_SONAME, strlen) +STRLEN(VG_Z_LD_LINUX_SO_2, strlen) +STRLEN(VG_Z_LD_LINUX_X86_64_SO_2, strlen) + + +#define STRCPY(soname, fnname) \ + char* VG_REPLACE_FUNCTION_ZU(soname, fnname) ( char* dst, const char* src ); \ + char* VG_REPLACE_FUNCTION_ZU(soname, fnname) ( char* dst, const char* src ) \ + { \ + const Char* dst_orig = dst; \ + \ + while (*src) *dst++ = *src++; \ + *dst = 0; \ + \ + return (char*)dst_orig; \ + } + +STRCPY(VG_Z_LIBC_SONAME, strcpy) + + +#define STRCMP(soname, fnname) \ + int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ + ( const char* s1, const char* s2 ); \ + int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ + ( const char* s1, const char* s2 ) \ + { \ + register unsigned char c1; \ + register unsigned char c2; \ + while (True) { \ + c1 = *(unsigned char *)s1; \ + c2 = *(unsigned char *)s2; \ + if (c1 != c2) break; \ + if (c1 == 0) break; \ + s1++; s2++; \ + } \ + if ((unsigned char)c1 < (unsigned char)c2) return -1; \ + if ((unsigned char)c1 > (unsigned char)c2) return 1; \ + return 0; \ + } + +STRCMP(VG_Z_LIBC_SONAME, strcmp) +STRCMP(VG_Z_LD_LINUX_X86_64_SO_2, strcmp) +STRCMP(VG_Z_LD64_SO_1, strcmp) + + +#define MEMCPY(soname, fnname) \ + void* VG_REPLACE_FUNCTION_ZU(soname,fnname) \ + ( void *dst, const void *src, SizeT len ); \ + void* VG_REPLACE_FUNCTION_ZU(soname,fnname) \ + ( void *dst, const void *src, SizeT len ) \ + { \ + register char *d; \ + register char *s; \ + \ + if (len == 0) \ + return dst; \ + \ + if ( dst > src ) { \ + d = (char *)dst + len - 1; \ + s = (char *)src + len - 1; \ + while ( len >= 4 ) { \ + *d-- = *s--; \ + *d-- = *s--; \ + *d-- = *s--; \ + *d-- = *s--; \ + len -= 4; \ + } \ + while ( len-- ) { \ + *d-- = *s--; \ + } \ + } else if ( dst < src ) { \ + d = (char *)dst; \ + s = (char *)src; \ + while ( len >= 4 ) { \ + *d++ = *s++; \ + *d++ = *s++; \ + *d++ = *s++; \ + *d++ = *s++; \ + len -= 4; \ + } \ + while ( len-- ) { \ + *d++ = *s++; \ + } \ + } \ + return dst; \ + } + +MEMCPY(VG_Z_LIBC_SONAME, memcpy) +MEMCPY(VG_Z_LD_SO_1, memcpy) /* ld.so.1 */ +MEMCPY(VG_Z_LD64_SO_1, memcpy) /* ld64.so.1 */ +/* icc9 blats these around all over the place. Not only in the main + executable but various .so's. They are highly tuned and read + memory beyond the source boundary (although work correctly and + never go across page boundaries), so give errors when run natively, + at least for misaligned source arg. Just intercepting in the exe + only until we understand more about the problem. See + http://bugs.kde.org/show_bug.cgi?id=139776 + */ +MEMCPY(NONE, _intel_fast_memcpy) + + +/*--------------------------------------------------------------------*/ +/*--- end tc_intercepts.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/hg_lock_n_thread.c b/helgrind/hg_lock_n_thread.c new file mode 100644 index 0000000..bcdb236 --- /dev/null +++ b/helgrind/hg_lock_n_thread.c @@ -0,0 +1,123 @@ + +/*--------------------------------------------------------------------*/ +/*--- Definitions for Locks and Threads. ---*/ +/*--- hg_lock_n_thread.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_libcbase.h" +#include "pub_tool_libcassert.h" +#include "pub_tool_execontext.h" +#include "pub_tool_threadstate.h" +#include "pub_tool_wordfm.h" + +#include "hg_basics.h" +#include "hg_wordset.h" +#include "hg_lock_n_thread.h" /* self */ + + +/*----------------------------------------------------------------*/ +/*--- Sanity checking ---*/ +/*----------------------------------------------------------------*/ + +inline Bool HG_(is_sane_Thread) ( Thread* thr ) { + return thr != NULL && thr->magic == Thread_MAGIC; +} + +static Bool is_sane_Bag_of_Threads ( WordBag* bag ) +{ + Thread* thr; + Word count; + VG_(initIterBag)( bag ); + while (VG_(nextIterBag)( bag, (Word*)&thr, &count )) { + if (count < 1) return False; + if (!HG_(is_sane_Thread)(thr)) return False; + } + VG_(doneIterBag)( bag ); + return True; +} + +static Bool is_sane_Lock_BASE ( Lock* lock ) +{ + if (lock == NULL + || (lock->magic != LockN_MAGIC && lock->magic != LockP_MAGIC)) + return False; + switch (lock->kind) { + case LK_mbRec: case LK_nonRec: case LK_rdwr: break; + default: return False; + } + if (lock->heldBy == NULL) { + if (lock->acquired_at != NULL) return False; + /* Unheld. We arbitrarily require heldW to be False. */ + return !lock->heldW; + } else { + if (lock->acquired_at == NULL) return False; + } + + /* If heldBy is non-NULL, we require it to contain at least one + thread. */ + if (VG_(isEmptyBag)(lock->heldBy)) + return False; + + /* Lock is either r- or w-held. */ + if (!is_sane_Bag_of_Threads(lock->heldBy)) + return False; + if (lock->heldW) { + /* Held in write-mode */ + if ((lock->kind == LK_nonRec || lock->kind == LK_rdwr) + && !VG_(isSingletonTotalBag)(lock->heldBy)) + return False; + } else { + /* Held in read-mode */ + if (lock->kind != LK_rdwr) return False; + } + return True; +} + +Bool HG_(is_sane_LockP) ( Lock* lock ) { + return lock != NULL + && lock->magic == LockP_MAGIC + && lock->hbso == NULL + && is_sane_Lock_BASE(lock); +} + +Bool HG_(is_sane_LockN) ( Lock* lock ) { + return lock != NULL + && lock->magic == LockN_MAGIC + && lock->hbso != NULL + && is_sane_Lock_BASE(lock); +} + +Bool HG_(is_sane_LockNorP) ( Lock* lock ) { + return is_sane_Lock_BASE(lock); +} + + +/*--------------------------------------------------------------------*/ +/*--- end hg_lock_n_thread.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/hg_lock_n_thread.h b/helgrind/hg_lock_n_thread.h new file mode 100644 index 0000000..01ae3aa --- /dev/null +++ b/helgrind/hg_lock_n_thread.h @@ -0,0 +1,165 @@ + +/*--------------------------------------------------------------------*/ +/*--- Definitions for Locks and Threads. ---*/ +/*--- hg_lock_n_thread.h ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#ifndef __HG_LOCK_N_THREAD_H +#define __HG_LOCK_N_THREAD_H + + +/*----------------------------------------------------------------*/ +/*--- Primary data definitions ---*/ +/*----------------------------------------------------------------*/ + +/* Magic numbers, for doing assertions that structures really are of + the right type. Useful as some of the code can get a bit + complex. */ +#define Thread_MAGIC 0x504fc5e5 +#define LockN_MAGIC 0x6545b557 /* normal nonpersistent locks */ +#define LockP_MAGIC 0x755b5456 /* persistent (copied) locks */ + + +/* These are handles for Word sets. CONSTRAINTS: must be (very) small + ints numbered from zero, since < 30-bit versions of them are used to + encode thread-sets and lock-sets in 32-bit shadow words. */ +typedef WordSet WordSetID; + + +/* Synchronisation Objects, exported abstractly by libhb. */ +typedef struct _SO SO; + +/* Thr, libhb's private thread record, exported abstractly */ +typedef struct _Thr Thr; + + +/* Stores information about a thread. Addresses of these also serve + as unique thread identifiers and so are never freed, so they should + be as small as possible. Freeing Thread structures makes the + storage management just too complex, and most programs don't create + many threads, so tolerating this leak seems like a not-bad + tradeoff. + + Since these are never freed, the .coretid field only indicates the + core's ThreadId associated with this Thread whilst it is alive. + Once the thread finishes, the ThreadId is set to + VG_INVALID_THREADID. + + The core may later re-use the same ThreadId for what is a logically + completely different thread, which of course must have a different + Thread structure. */ +typedef + struct _Thread { + /* ADMIN */ + struct _Thread* admin; + UInt magic; + Thr* hbthr; + ThreadId coretid; + /* USEFUL */ + WordSetID locksetA; /* WordSet of Lock* currently held by thread */ + WordSetID locksetW; /* subset of locksetA held in w-mode */ + /* EXPOSITION */ + /* Place where parent was when this thread was created. */ + ExeContext* created_at; + Bool announced; + /* Index for generating references in error messages. */ + Int errmsg_index; + } + Thread; + + +/* Stores information about a lock's current state. These are + allocated and later freed (when the containing memory becomes + NoAccess). This gives a problem for the XError type, which + contains Lock*s. Solution is to copy any Lock which is to be + incorporated into an XErrors, so as to make it independent from the + 'normal' collection of Locks, which can come and go. When the lock + is copied, its .magic is changed from LockN_Magic to + LockP_Magic. */ + +/* Lock kinds. */ +typedef + enum { + LK_mbRec=1001, /* normal mutex, possibly recursive */ + LK_nonRec, /* normal mutex, definitely non recursive */ + LK_rdwr /* reader-writer lock */ + } + LockKind; + +typedef + struct _Lock { + /* ADMIN */ + struct _Lock* admin; + ULong unique; /* used for persistence-hashing */ + UInt magic; /* LockN_MAGIC or LockP_MAGIC */ + /* EXPOSITION */ + /* Place where lock first came to the attention of Helgrind. */ + ExeContext* appeared_at; + /* If the lock is held, place where the lock most recently made + an unlocked->locked transition. Must be sync'd with .heldBy: + either both NULL or both non-NULL. */ + ExeContext* acquired_at; + /* USEFUL-STATIC */ + SO* hbso; /* associated SO */ + Addr guestaddr; /* Guest address of lock */ + LockKind kind; /* what kind of lock this is */ + /* USEFUL-DYNAMIC */ + Bool heldW; + WordBag* heldBy; /* bag of threads that hold this lock */ + /* .heldBy is NULL: lock is unheld, and .heldW is meaningless + but arbitrarily set to False + .heldBy is non-NULL: + .heldW is True: lock is w-held by threads in heldBy + .heldW is False: lock is r-held by threads in heldBy + Either way, heldBy may not validly be an empty Bag. + + for LK_nonRec, r-holdings are not allowed, and w-holdings may + only have sizeTotal(heldBy) == 1 + + for LK_mbRec, r-holdings are not allowed, and w-holdings may + only have sizeUnique(heldBy) == 1 + + for LK_rdwr, w-holdings may only have sizeTotal(heldBy) == 1 */ + } + Lock; + +/*----------------------------------------------------------------*/ +/*--- Sanity checking ---*/ +/*----------------------------------------------------------------*/ + +Bool HG_(is_sane_Thread) ( Thread* thr ); +Bool HG_(is_sane_LockP) ( Lock* lock ); +Bool HG_(is_sane_LockN) ( Lock* lock ); +Bool HG_(is_sane_LockNorP) ( Lock* lock ); + + +#endif /* ! __HG_LOCK_N_THREAD_H */ + +/*--------------------------------------------------------------------*/ +/*--- end hg_lock_n_thread.h ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c new file mode 100644 index 0000000..d63d73b --- /dev/null +++ b/helgrind/hg_main.c @@ -0,0 +1,4287 @@ + +/*--------------------------------------------------------------------*/ +/*--- Helgrind: a Valgrind tool for detecting errors ---*/ +/*--- in threaded programs. hg_main.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks LLP + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. + + Neither the names of the U.S. Department of Energy nor the + University of California nor the names of its contributors may be + used to endorse or promote products derived from this software + without prior written permission. +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_libcassert.h" +#include "pub_tool_libcbase.h" +#include "pub_tool_libcprint.h" +#include "pub_tool_threadstate.h" +#include "pub_tool_tooliface.h" +#include "pub_tool_hashtable.h" +#include "pub_tool_replacemalloc.h" +#include "pub_tool_machine.h" +#include "pub_tool_options.h" +#include "pub_tool_xarray.h" +#include "pub_tool_stacktrace.h" +#include "pub_tool_debuginfo.h" /* VG_(get_data_description) */ +#include "pub_tool_wordfm.h" + +#include "hg_basics.h" +#include "hg_wordset.h" +#include "hg_lock_n_thread.h" +#include "hg_errors.h" + +#include "libhb.h" + +#include "helgrind.h" + + +// FIXME: new_mem_w_tid ignores the supplied tid. (wtf?!) + +// FIXME: when client destroys a lock or a CV, remove these +// from our mappings, so that the associated SO can be freed up + +/*----------------------------------------------------------------*/ +/*--- ---*/ +/*----------------------------------------------------------------*/ + +/* Note this needs to be compiled with -fno-strict-aliasing, since it + contains a whole bunch of calls to lookupFM etc which cast between + Word and pointer types. gcc rightly complains this breaks ANSI C + strict aliasing rules, at -O2. No complaints at -O, but -O2 gives + worthwhile performance benefits over -O. +*/ + +// FIXME catch sync signals (SEGV, basically) and unlock BHL, +// if held. Otherwise a LOCK-prefixed insn which segfaults +// gets Helgrind into a total muddle as the BHL will not be +// released after the insn. + +// FIXME what is supposed to happen to locks in memory which +// is relocated as a result of client realloc? + +// FIXME put referencing ThreadId into Thread and get +// rid of the slow reverse mapping function. + +// FIXME accesses to NoAccess areas: change state to Excl? + +// FIXME report errors for accesses of NoAccess memory? + +// FIXME pth_cond_wait/timedwait wrappers. Even if these fail, +// the thread still holds the lock. + +/* ------------ Debug/trace options ------------ */ + +// this is: +// shadow_mem_make_NoAccess: 29156 SMs, 1728 scanned +// happens_before_wrk: 1000 +// ev__post_thread_join: 3360 SMs, 29 scanned, 252 re-Excls +#define SHOW_EXPENSIVE_STUFF 0 + +// 0 for silent, 1 for some stuff, 2 for lots of stuff +#define SHOW_EVENTS 0 + + +static void all__sanity_check ( Char* who ); /* fwds */ + +#define HG_CLI__MALLOC_REDZONE_SZB 16 /* let's say */ + +// 0 for none, 1 for dump at end of run +#define SHOW_DATA_STRUCTURES 0 + + +/* ------------ Misc comments ------------ */ + +// FIXME: don't hardwire initial entries for root thread. +// Instead, let the pre_thread_ll_create handler do this. + + +/*----------------------------------------------------------------*/ +/*--- Primary data structures ---*/ +/*----------------------------------------------------------------*/ + +/* Admin linked list of Threads */ +static Thread* admin_threads = NULL; + +/* Admin linked list of Locks */ +static Lock* admin_locks = NULL; + +/* Mapping table for core ThreadIds to Thread* */ +static Thread** map_threads = NULL; /* Array[VG_N_THREADS] of Thread* */ + +/* Mapping table for lock guest addresses to Lock* */ +static WordFM* map_locks = NULL; /* WordFM LockAddr Lock* */ + +/* The word-set universes for thread sets and lock sets. */ +static WordSetU* univ_tsets = NULL; /* sets of Thread* */ +static WordSetU* univ_lsets = NULL; /* sets of Lock* */ +static WordSetU* univ_laog = NULL; /* sets of Lock*, for LAOG */ + +/* never changed; we only care about its address. Is treated as if it + was a standard userspace lock. Also we have a Lock* describing it + so it can participate in lock sets in the usual way. */ +static Int __bus_lock = 0; +static Lock* __bus_lock_Lock = NULL; + + +/*----------------------------------------------------------------*/ +/*--- Simple helpers for the data structures ---*/ +/*----------------------------------------------------------------*/ + +static UWord stats__lockN_acquires = 0; +static UWord stats__lockN_releases = 0; + +static +ThreadId map_threads_maybe_reverse_lookup_SLOW ( Thread* thr ); /*fwds*/ + +/* --------- Constructors --------- */ + +static Thread* mk_Thread ( Thr* hbthr ) { + static Int indx = 1; + Thread* thread = HG_(zalloc)( "hg.mk_Thread.1", sizeof(Thread) ); + thread->locksetA = HG_(emptyWS)( univ_lsets ); + thread->locksetW = HG_(emptyWS)( univ_lsets ); + thread->magic = Thread_MAGIC; + thread->hbthr = hbthr; + thread->coretid = VG_INVALID_THREADID; + thread->created_at = NULL; + thread->announced = False; + thread->errmsg_index = indx++; + thread->admin = admin_threads; + admin_threads = thread; + return thread; +} + +// Make a new lock which is unlocked (hence ownerless) +static Lock* mk_LockN ( LockKind kind, Addr guestaddr ) { + static ULong unique = 0; + Lock* lock = HG_(zalloc)( "hg.mk_Lock.1", sizeof(Lock) ); + lock->admin = admin_locks; + lock->unique = unique++; + lock->magic = LockN_MAGIC; + lock->appeared_at = NULL; + lock->acquired_at = NULL; + lock->hbso = libhb_so_alloc(); + lock->guestaddr = guestaddr; + lock->kind = kind; + lock->heldW = False; + lock->heldBy = NULL; + tl_assert(HG_(is_sane_LockN)(lock)); + admin_locks = lock; + return lock; +} + +/* Release storage for a Lock. Also release storage in .heldBy, if + any. */ +static void del_LockN ( Lock* lk ) +{ + tl_assert(HG_(is_sane_LockN)(lk)); + tl_assert(lk->hbso); + libhb_so_dealloc(lk->hbso); + if (lk->heldBy) + VG_(deleteBag)( lk->heldBy ); + VG_(memset)(lk, 0xAA, sizeof(*lk)); + HG_(free)(lk); +} + +/* Update 'lk' to reflect that 'thr' now has a write-acquisition of + it. This is done strictly: only combinations resulting from + correct program and libpthread behaviour are allowed. */ +static void lockN_acquire_writer ( Lock* lk, Thread* thr ) +{ + tl_assert(HG_(is_sane_LockN)(lk)); + tl_assert(HG_(is_sane_Thread)(thr)); + + stats__lockN_acquires++; + + /* EXPOSITION only */ + /* We need to keep recording snapshots of where the lock was + acquired, so as to produce better lock-order error messages. */ + if (lk->acquired_at == NULL) { + ThreadId tid; + tl_assert(lk->heldBy == NULL); + tid = map_threads_maybe_reverse_lookup_SLOW(thr); + lk->acquired_at + = VG_(record_ExeContext)(tid, 0/*first_ip_delta*/); + } else { + tl_assert(lk->heldBy != NULL); + } + /* end EXPOSITION only */ + + switch (lk->kind) { + case LK_nonRec: + case_LK_nonRec: + tl_assert(lk->heldBy == NULL); /* can't w-lock recursively */ + tl_assert(!lk->heldW); + lk->heldW = True; + lk->heldBy = VG_(newBag)( HG_(zalloc), "hg.lNaw.1", HG_(free) ); + VG_(addToBag)( lk->heldBy, (Word)thr ); + break; + case LK_mbRec: + if (lk->heldBy == NULL) + goto case_LK_nonRec; + /* 2nd and subsequent locking of a lock by its owner */ + tl_assert(lk->heldW); + /* assert: lk is only held by one thread .. */ + tl_assert(VG_(sizeUniqueBag(lk->heldBy)) == 1); + /* assert: .. and that thread is 'thr'. */ + tl_assert(VG_(elemBag)(lk->heldBy, (Word)thr) + == VG_(sizeTotalBag)(lk->heldBy)); + VG_(addToBag)(lk->heldBy, (Word)thr); + break; + case LK_rdwr: + tl_assert(lk->heldBy == NULL && !lk->heldW); /* must be unheld */ + goto case_LK_nonRec; + default: + tl_assert(0); + } + tl_assert(HG_(is_sane_LockN)(lk)); +} + +static void lockN_acquire_reader ( Lock* lk, Thread* thr ) +{ + tl_assert(HG_(is_sane_LockN)(lk)); + tl_assert(HG_(is_sane_Thread)(thr)); + /* can only add reader to a reader-writer lock. */ + tl_assert(lk->kind == LK_rdwr); + /* lk must be free or already r-held. */ + tl_assert(lk->heldBy == NULL + || (lk->heldBy != NULL && !lk->heldW)); + + stats__lockN_acquires++; + + /* EXPOSITION only */ + /* We need to keep recording snapshots of where the lock was + acquired, so as to produce better lock-order error messages. */ + if (lk->acquired_at == NULL) { + ThreadId tid; + tl_assert(lk->heldBy == NULL); + tid = map_threads_maybe_reverse_lookup_SLOW(thr); + lk->acquired_at + = VG_(record_ExeContext)(tid, 0/*first_ip_delta*/); + } else { + tl_assert(lk->heldBy != NULL); + } + /* end EXPOSITION only */ + + if (lk->heldBy) { + VG_(addToBag)(lk->heldBy, (Word)thr); + } else { + lk->heldW = False; + lk->heldBy = VG_(newBag)( HG_(zalloc), "hg.lNar.1", HG_(free) ); + VG_(addToBag)( lk->heldBy, (Word)thr ); + } + tl_assert(!lk->heldW); + tl_assert(HG_(is_sane_LockN)(lk)); +} + +/* Update 'lk' to reflect a release of it by 'thr'. This is done + strictly: only combinations resulting from correct program and + libpthread behaviour are allowed. */ + +static void lockN_release ( Lock* lk, Thread* thr ) +{ + Bool b; + tl_assert(HG_(is_sane_LockN)(lk)); + tl_assert(HG_(is_sane_Thread)(thr)); + /* lock must be held by someone */ + tl_assert(lk->heldBy); + stats__lockN_releases++; + /* Remove it from the holder set */ + b = VG_(delFromBag)(lk->heldBy, (Word)thr); + /* thr must actually have been a holder of lk */ + tl_assert(b); + /* normalise */ + tl_assert(lk->acquired_at); + if (VG_(isEmptyBag)(lk->heldBy)) { + VG_(deleteBag)(lk->heldBy); + lk->heldBy = NULL; + lk->heldW = False; + lk->acquired_at = NULL; + } + tl_assert(HG_(is_sane_LockN)(lk)); +} + +static void remove_Lock_from_locksets_of_all_owning_Threads( Lock* lk ) +{ + Thread* thr; + if (!lk->heldBy) { + tl_assert(!lk->heldW); + return; + } + /* for each thread that holds this lock do ... */ + VG_(initIterBag)( lk->heldBy ); + while (VG_(nextIterBag)( lk->heldBy, (Word*)&thr, NULL )) { + tl_assert(HG_(is_sane_Thread)(thr)); + tl_assert(HG_(elemWS)( univ_lsets, + thr->locksetA, (Word)lk )); + thr->locksetA + = HG_(delFromWS)( univ_lsets, thr->locksetA, (Word)lk ); + + if (lk->heldW) { + tl_assert(HG_(elemWS)( univ_lsets, + thr->locksetW, (Word)lk )); + thr->locksetW + = HG_(delFromWS)( univ_lsets, thr->locksetW, (Word)lk ); + } + } + VG_(doneIterBag)( lk->heldBy ); +} + + +/*----------------------------------------------------------------*/ +/*--- Print out the primary data structures ---*/ +/*----------------------------------------------------------------*/ + +//static WordSetID del_BHL ( WordSetID lockset ); /* fwds */ + +#define PP_THREADS (1<<1) +#define PP_LOCKS (1<<2) +#define PP_ALL (PP_THREADS | PP_LOCKS) + + +static const Int sHOW_ADMIN = 0; + +static void space ( Int n ) +{ + Int i; + Char spaces[128+1]; + tl_assert(n >= 0 && n < 128); + if (n == 0) + return; + for (i = 0; i < n; i++) + spaces[i] = ' '; + spaces[i] = 0; + tl_assert(i < 128+1); + VG_(printf)("%s", spaces); +} + +static void pp_Thread ( Int d, Thread* t ) +{ + space(d+0); VG_(printf)("Thread %p {\n", t); + if (sHOW_ADMIN) { + space(d+3); VG_(printf)("admin %p\n", t->admin); + space(d+3); VG_(printf)("magic 0x%x\n", (UInt)t->magic); + } + space(d+3); VG_(printf)("locksetA %d\n", (Int)t->locksetA); + space(d+3); VG_(printf)("locksetW %d\n", (Int)t->locksetW); + space(d+0); VG_(printf)("}\n"); +} + +static void pp_admin_threads ( Int d ) +{ + Int i, n; + Thread* t; + for (n = 0, t = admin_threads; t; n++, t = t->admin) { + /* nothing */ + } + space(d); VG_(printf)("admin_threads (%d records) {\n", n); + for (i = 0, t = admin_threads; t; i++, t = t->admin) { + if (0) { + space(n); + VG_(printf)("admin_threads record %d of %d:\n", i, n); + } + pp_Thread(d+3, t); + } + space(d); VG_(printf)("}\n"); +} + +static void pp_map_threads ( Int d ) +{ + Int i, n = 0; + space(d); VG_(printf)("map_threads "); + for (i = 0; i < VG_N_THREADS; i++) { + if (map_threads[i] != NULL) + n++; + } + VG_(printf)("(%d entries) {\n", n); + for (i = 0; i < VG_N_THREADS; i++) { + if (map_threads[i] == NULL) + continue; + space(d+3); + VG_(printf)("coretid %d -> Thread %p\n", i, map_threads[i]); + } + space(d); VG_(printf)("}\n"); +} + +static const HChar* show_LockKind ( LockKind lkk ) { + switch (lkk) { + case LK_mbRec: return "mbRec"; + case LK_nonRec: return "nonRec"; + case LK_rdwr: return "rdwr"; + default: tl_assert(0); + } +} + +static void pp_Lock ( Int d, Lock* lk ) +{ + space(d+0); VG_(printf)("Lock %p (ga %#lx) {\n", lk, lk->guestaddr); + if (sHOW_ADMIN) { + space(d+3); VG_(printf)("admin %p\n", lk->admin); + space(d+3); VG_(printf)("magic 0x%x\n", (UInt)lk->magic); + } + space(d+3); VG_(printf)("unique %llu\n", lk->unique); + space(d+3); VG_(printf)("kind %s\n", show_LockKind(lk->kind)); + space(d+3); VG_(printf)("heldW %s\n", lk->heldW ? "yes" : "no"); + space(d+3); VG_(printf)("heldBy %p", lk->heldBy); + if (lk->heldBy) { + Thread* thr; + Word count; + VG_(printf)(" { "); + VG_(initIterBag)( lk->heldBy ); + while (VG_(nextIterBag)( lk->heldBy, (Word*)&thr, &count )) + VG_(printf)("%lu:%p ", count, thr); + VG_(doneIterBag)( lk->heldBy ); + VG_(printf)("}"); + } + VG_(printf)("\n"); + space(d+0); VG_(printf)("}\n"); +} + +static void pp_admin_locks ( Int d ) +{ + Int i, n; + Lock* lk; + for (n = 0, lk = admin_locks; lk; n++, lk = lk->admin) { + /* nothing */ + } + space(d); VG_(printf)("admin_locks (%d records) {\n", n); + for (i = 0, lk = admin_locks; lk; i++, lk = lk->admin) { + if (0) { + space(n); + VG_(printf)("admin_locks record %d of %d:\n", i, n); + } + pp_Lock(d+3, lk); + } + space(d); VG_(printf)("}\n"); +} + +static void pp_map_locks ( Int d ) +{ + void* gla; + Lock* lk; + space(d); VG_(printf)("map_locks (%d entries) {\n", + (Int)VG_(sizeFM)( map_locks )); + VG_(initIterFM)( map_locks ); + while (VG_(nextIterFM)( map_locks, (Word*)&gla, + (Word*)&lk )) { + space(d+3); + VG_(printf)("guest %p -> Lock %p\n", gla, lk); + } + VG_(doneIterFM)( map_locks ); + space(d); VG_(printf)("}\n"); +} + +static void pp_everything ( Int flags, Char* caller ) +{ + Int d = 0; + VG_(printf)("\n"); + VG_(printf)("All_Data_Structures (caller = \"%s\") {\n", caller); + if (flags & PP_THREADS) { + VG_(printf)("\n"); + pp_admin_threads(d+3); + VG_(printf)("\n"); + pp_map_threads(d+3); + } + if (flags & PP_LOCKS) { + VG_(printf)("\n"); + pp_admin_locks(d+3); + VG_(printf)("\n"); + pp_map_locks(d+3); + } + + VG_(printf)("\n"); + VG_(printf)("}\n"); + VG_(printf)("\n"); +} + +#undef SHOW_ADMIN + + +/*----------------------------------------------------------------*/ +/*--- Initialise the primary data structures ---*/ +/*----------------------------------------------------------------*/ + +static void initialise_data_structures ( Thr* hbthr_root ) +{ + Thread* thr; + + /* Get everything initialised and zeroed. */ + tl_assert(admin_threads == NULL); + tl_assert(admin_locks == NULL); + + tl_assert(sizeof(Addr) == sizeof(Word)); + + tl_assert(map_threads == NULL); + map_threads = HG_(zalloc)( "hg.ids.1", VG_N_THREADS * sizeof(Thread*) ); + tl_assert(map_threads != NULL); + + tl_assert(sizeof(Addr) == sizeof(Word)); + tl_assert(map_locks == NULL); + map_locks = VG_(newFM)( HG_(zalloc), "hg.ids.2", HG_(free), + NULL/*unboxed Word cmp*/); + tl_assert(map_locks != NULL); + + __bus_lock_Lock = mk_LockN( LK_nonRec, (Addr)&__bus_lock ); + tl_assert(HG_(is_sane_LockN)(__bus_lock_Lock)); + VG_(addToFM)( map_locks, (Word)&__bus_lock, (Word)__bus_lock_Lock ); + + tl_assert(univ_tsets == NULL); + univ_tsets = HG_(newWordSetU)( HG_(zalloc), "hg.ids.3", HG_(free), + 8/*cacheSize*/ ); + tl_assert(univ_tsets != NULL); + + tl_assert(univ_lsets == NULL); + univ_lsets = HG_(newWordSetU)( HG_(zalloc), "hg.ids.4", HG_(free), + 8/*cacheSize*/ ); + tl_assert(univ_lsets != NULL); + + tl_assert(univ_laog == NULL); + univ_laog = HG_(newWordSetU)( HG_(zalloc), "hg.ids.5 (univ_laog)", + HG_(free), 24/*cacheSize*/ ); + tl_assert(univ_laog != NULL); + + /* Set up entries for the root thread */ + // FIXME: this assumes that the first real ThreadId is 1 + + /* a Thread for the new thread ... */ + thr = mk_Thread(hbthr_root); + thr->coretid = 1; /* FIXME: hardwires an assumption about the + identity of the root thread. */ + tl_assert( libhb_get_Thr_opaque(hbthr_root) == NULL ); + libhb_set_Thr_opaque(hbthr_root, thr); + + /* and bind it in the thread-map table. */ + tl_assert(HG_(is_sane_ThreadId)(thr->coretid)); + tl_assert(thr->coretid != VG_INVALID_THREADID); + + map_threads[thr->coretid] = thr; + + tl_assert(VG_INVALID_THREADID == 0); + + /* Mark the new bus lock correctly (to stop the sanity checks + complaining) */ + tl_assert( sizeof(__bus_lock) == 4 ); + + all__sanity_check("initialise_data_structures"); +} + + +/*----------------------------------------------------------------*/ +/*--- map_threads :: array[core-ThreadId] of Thread* ---*/ +/*----------------------------------------------------------------*/ + +/* Doesn't assert if the relevant map_threads entry is NULL. */ +static Thread* map_threads_maybe_lookup ( ThreadId coretid ) +{ + Thread* thr; + tl_assert( HG_(is_sane_ThreadId)(coretid) ); + thr = map_threads[coretid]; + return thr; +} + +/* Asserts if the relevant map_threads entry is NULL. */ +static inline Thread* map_threads_lookup ( ThreadId coretid ) +{ + Thread* thr; + tl_assert( HG_(is_sane_ThreadId)(coretid) ); + thr = map_threads[coretid]; + tl_assert(thr); + return thr; +} + +/* Do a reverse lookup. Does not assert if 'thr' is not found in + map_threads. */ +static ThreadId map_threads_maybe_reverse_lookup_SLOW ( Thread* thr ) +{ + ThreadId tid; + tl_assert(HG_(is_sane_Thread)(thr)); + /* Check nobody used the invalid-threadid slot */ + tl_assert(VG_INVALID_THREADID >= 0 && VG_INVALID_THREADID < VG_N_THREADS); + tl_assert(map_threads[VG_INVALID_THREADID] == NULL); + tid = thr->coretid; + tl_assert(HG_(is_sane_ThreadId)(tid)); + return tid; +} + +/* Do a reverse lookup. Warning: POTENTIALLY SLOW. Asserts if 'thr' + is not found in map_threads. */ +static ThreadId map_threads_reverse_lookup_SLOW ( Thread* thr ) +{ + ThreadId tid = map_threads_maybe_reverse_lookup_SLOW( thr ); + tl_assert(tid != VG_INVALID_THREADID); + tl_assert(map_threads[tid]); + tl_assert(map_threads[tid]->coretid == tid); + return tid; +} + +static void map_threads_delete ( ThreadId coretid ) +{ + Thread* thr; + tl_assert(coretid != 0); + tl_assert( HG_(is_sane_ThreadId)(coretid) ); + thr = map_threads[coretid]; + tl_assert(thr); + map_threads[coretid] = NULL; +} + + +/*----------------------------------------------------------------*/ +/*--- map_locks :: WordFM guest-Addr-of-lock Lock* ---*/ +/*----------------------------------------------------------------*/ + +/* Make sure there is a lock table entry for the given (lock) guest + address. If not, create one of the stated 'kind' in unheld state. + In any case, return the address of the existing or new Lock. */ +static +Lock* map_locks_lookup_or_create ( LockKind lkk, Addr ga, ThreadId tid ) +{ + Bool found; + Lock* oldlock = NULL; + tl_assert(HG_(is_sane_ThreadId)(tid)); + found = VG_(lookupFM)( map_locks, + NULL, (Word*)&oldlock, (Word)ga ); + if (!found) { + Lock* lock = mk_LockN(lkk, ga); + lock->appeared_at = VG_(record_ExeContext)( tid, 0 ); + tl_assert(HG_(is_sane_LockN)(lock)); + VG_(addToFM)( map_locks, (Word)ga, (Word)lock ); + tl_assert(oldlock == NULL); + return lock; + } else { + tl_assert(oldlock != NULL); + tl_assert(HG_(is_sane_LockN)(oldlock)); + tl_assert(oldlock->guestaddr == ga); + return oldlock; + } +} + +static Lock* map_locks_maybe_lookup ( Addr ga ) +{ + Bool found; + Lock* lk = NULL; + found = VG_(lookupFM)( map_locks, NULL, (Word*)&lk, (Word)ga ); + tl_assert(found ? lk != NULL : lk == NULL); + return lk; +} + +static void map_locks_delete ( Addr ga ) +{ + Addr ga2 = 0; + Lock* lk = NULL; + VG_(delFromFM)( map_locks, + (Word*)&ga2, (Word*)&lk, (Word)ga ); + /* delFromFM produces the val which is being deleted, if it is + found. So assert it is non-null; that in effect asserts that we + are deleting a (ga, Lock) pair which actually exists. */ + tl_assert(lk != NULL); + tl_assert(ga2 == ga); +} + + + +/*----------------------------------------------------------------*/ +/*--- Sanity checking the data structures ---*/ +/*----------------------------------------------------------------*/ + +static UWord stats__sanity_checks = 0; + +static void laog__sanity_check ( Char* who ); /* fwds */ + +/* REQUIRED INVARIANTS: + + Thread vs Segment/Lock/SecMaps + + for each t in Threads { + + // Thread.lockset: each element is really a valid Lock + + // Thread.lockset: each Lock in set is actually held by that thread + for lk in Thread.lockset + lk == LockedBy(t) + + // Thread.csegid is a valid SegmentID + // and the associated Segment has .thr == t + + } + + all thread Locksets are pairwise empty under intersection + (that is, no lock is claimed to be held by more than one thread) + -- this is guaranteed if all locks in locksets point back to their + owner threads + + Lock vs Thread/Segment/SecMaps + + for each entry (gla, la) in map_locks + gla == la->guest_addr + + for each lk in Locks { + + lk->tag is valid + lk->guest_addr does not have shadow state NoAccess + if lk == LockedBy(t), then t->lockset contains lk + if lk == UnlockedBy(segid) then segid is valid SegmentID + and can be mapped to a valid Segment(seg) + and seg->thr->lockset does not contain lk + if lk == UnlockedNew then (no lockset contains lk) + + secmaps for lk has .mbHasLocks == True + + } + + Segment vs Thread/Lock/SecMaps + + the Segment graph is a dag (no cycles) + all of the Segment graph must be reachable from the segids + mentioned in the Threads + + for seg in Segments { + + seg->thr is a sane Thread + + } + + SecMaps vs Segment/Thread/Lock + + for sm in SecMaps { + + sm properly aligned + if any shadow word is ShR or ShM then .mbHasShared == True + + for each Excl(segid) state + map_segments_lookup maps to a sane Segment(seg) + for each ShM/ShR(tsetid,lsetid) state + each lk in lset is a valid Lock + each thr in tset is a valid thread, which is non-dead + + } +*/ + + +/* Return True iff 'thr' holds 'lk' in some mode. */ +static Bool thread_is_a_holder_of_Lock ( Thread* thr, Lock* lk ) +{ + if (lk->heldBy) + return VG_(elemBag)( lk->heldBy, (Word)thr ) > 0; + else + return False; +} + +/* Sanity check Threads, as far as possible */ +__attribute__((noinline)) +static void threads__sanity_check ( Char* who ) +{ +#define BAD(_str) do { how = (_str); goto bad; } while (0) + Char* how = "no error"; + Thread* thr; + WordSetID wsA, wsW; + UWord* ls_words; + Word ls_size, i; + Lock* lk; + for (thr = admin_threads; thr; thr = thr->admin) { + if (!HG_(is_sane_Thread)(thr)) BAD("1"); + wsA = thr->locksetA; + wsW = thr->locksetW; + // locks held in W mode are a subset of all locks held + if (!HG_(isSubsetOf)( univ_lsets, wsW, wsA )) BAD("7"); + HG_(getPayloadWS)( &ls_words, &ls_size, univ_lsets, wsA ); + for (i = 0; i < ls_size; i++) { + lk = (Lock*)ls_words[i]; + // Thread.lockset: each element is really a valid Lock + if (!HG_(is_sane_LockN)(lk)) BAD("2"); + // Thread.lockset: each Lock in set is actually held by that + // thread + if (!thread_is_a_holder_of_Lock(thr,lk)) BAD("3"); + } + } + return; + bad: + VG_(printf)("threads__sanity_check: who=\"%s\", bad=\"%s\"\n", who, how); + tl_assert(0); +#undef BAD +} + + +/* Sanity check Locks, as far as possible */ +__attribute__((noinline)) +static void locks__sanity_check ( Char* who ) +{ +#define BAD(_str) do { how = (_str); goto bad; } while (0) + Char* how = "no error"; + Addr gla; + Lock* lk; + Int i; + // # entries in admin_locks == # entries in map_locks + for (i = 0, lk = admin_locks; lk; i++, lk = lk->admin) + ; + if (i != VG_(sizeFM)(map_locks)) BAD("1"); + // for each entry (gla, lk) in map_locks + // gla == lk->guest_addr + VG_(initIterFM)( map_locks ); + while (VG_(nextIterFM)( map_locks, + (Word*)&gla, (Word*)&lk )) { + if (lk->guestaddr != gla) BAD("2"); + } + VG_(doneIterFM)( map_locks ); + // scan through admin_locks ... + for (lk = admin_locks; lk; lk = lk->admin) { + // lock is sane. Quite comprehensive, also checks that + // referenced (holder) threads are sane. + if (!HG_(is_sane_LockN)(lk)) BAD("3"); + // map_locks binds guest address back to this lock + if (lk != map_locks_maybe_lookup(lk->guestaddr)) BAD("4"); + // look at all threads mentioned as holders of this lock. Ensure + // this lock is mentioned in their locksets. + if (lk->heldBy) { + Thread* thr; + Word count; + VG_(initIterBag)( lk->heldBy ); + while (VG_(nextIterBag)( lk->heldBy, + (Word*)&thr, &count )) { + // HG_(is_sane_LockN) above ensures these + tl_assert(count >= 1); + tl_assert(HG_(is_sane_Thread)(thr)); + if (!HG_(elemWS)(univ_lsets, thr->locksetA, (Word)lk)) + BAD("6"); + // also check the w-only lockset + if (lk->heldW + && !HG_(elemWS)(univ_lsets, thr->locksetW, (Word)lk)) + BAD("7"); + if ((!lk->heldW) + && HG_(elemWS)(univ_lsets, thr->locksetW, (Word)lk)) + BAD("8"); + } + VG_(doneIterBag)( lk->heldBy ); + } else { + /* lock not held by anybody */ + if (lk->heldW) BAD("9"); /* should be False if !heldBy */ + // since lk is unheld, then (no lockset contains lk) + // hmm, this is really too expensive to check. Hmm. + } + } + + return; + bad: + VG_(printf)("locks__sanity_check: who=\"%s\", bad=\"%s\"\n", who, how); + tl_assert(0); +#undef BAD +} + + +static void all_except_Locks__sanity_check ( Char* who ) { + stats__sanity_checks++; + if (0) VG_(printf)("all_except_Locks__sanity_check(%s)\n", who); + threads__sanity_check(who); + laog__sanity_check(who); +} +static void all__sanity_check ( Char* who ) { + all_except_Locks__sanity_check(who); + locks__sanity_check(who); +} + + +/*----------------------------------------------------------------*/ +/*--- the core memory state machine (msm__* functions) ---*/ +/*----------------------------------------------------------------*/ + +//static WordSetID add_BHL ( WordSetID lockset ) { +// return HG_(addToWS)( univ_lsets, lockset, (Word)__bus_lock_Lock ); +//} +//static WordSetID del_BHL ( WordSetID lockset ) { +// return HG_(delFromWS)( univ_lsets, lockset, (Word)__bus_lock_Lock ); +//} + + +///* Last-lock-lossage records. This mechanism exists to help explain +// to programmers why we are complaining about a race. The idea is to +// monitor all lockset transitions. When a previously nonempty +// lockset becomes empty, the lock(s) that just disappeared (the +// "lossage") are the locks that have consistently protected the +// location (ga_of_access) in question for the longest time. Most of +// the time the lossage-set is a single lock. Because the +// lossage-lock is the one that has survived longest, there is there +// is a good chance that it is indeed the lock that the programmer +// intended to use to protect the location. +// +// Note that we cannot in general just look at the lossage set when we +// see a transition to ShM(...,empty-set), because a transition to an +// empty lockset can happen arbitrarily far before the point where we +// want to report an error. This is in the case where there are many +// transitions ShR -> ShR, all with an empty lockset, and only later +// is there a transition to ShM. So what we want to do is note the +// lossage lock at the point where a ShR -> ShR transition empties out +// the lockset, so we can present it later if there should be a +// transition to ShM. +// +// So this function finds such transitions. For each, it associates +// in ga_to_lastlock, the guest address and the lossage lock. In fact +// we do not record the Lock* directly as that may disappear later, +// but instead the ExeContext inside the Lock which says where it was +// initialised or first locked. ExeContexts are permanent so keeping +// them indefinitely is safe. +// +// A boring detail: the hardware bus lock is not interesting in this +// respect, so we first remove that from the pre/post locksets. +//*/ +// +//static UWord stats__ga_LL_adds = 0; +// +//static WordFM* ga_to_lastlock = NULL; /* GuestAddr -> ExeContext* */ +// +//static +//void record_last_lock_lossage ( Addr ga_of_access, +// WordSetID lset_old, WordSetID lset_new ) +//{ +// Lock* lk; +// Int card_old, card_new; +// +// tl_assert(lset_old != lset_new); +// +// if (0) VG_(printf)("XX1: %d (card %ld) -> %d (card %ld) %#lx\n", +// (Int)lset_old, +// HG_(cardinalityWS)(univ_lsets,lset_old), +// (Int)lset_new, +// HG_(cardinalityWS)(univ_lsets,lset_new), +// ga_of_access ); +// +// /* This is slow, but at least it's simple. The bus hardware lock +// just confuses the logic, so remove it from the locksets we're +// considering before doing anything else. */ +// lset_new = del_BHL( lset_new ); +// +// if (!HG_(isEmptyWS)( univ_lsets, lset_new )) { +// /* The post-transition lock set is not empty. So we are not +// interested. We're only interested in spotting transitions +// that make locksets become empty. */ +// return; +// } +// +// /* lset_new is now empty */ +// card_new = HG_(cardinalityWS)( univ_lsets, lset_new ); +// tl_assert(card_new == 0); +// +// lset_old = del_BHL( lset_old ); +// card_old = HG_(cardinalityWS)( univ_lsets, lset_old ); +// +// if (0) VG_(printf)(" X2: %d (card %d) -> %d (card %d)\n", +// (Int)lset_old, card_old, (Int)lset_new, card_new ); +// +// if (card_old == 0) { +// /* The old lockset was also empty. Not interesting. */ +// return; +// } +// +// tl_assert(card_old > 0); +// tl_assert(!HG_(isEmptyWS)( univ_lsets, lset_old )); +// +// /* Now we know we've got a transition from a nonempty lockset to an +// empty one. So lset_old must be the set of locks lost. Record +// some details. If there is more than one element in the lossage +// set, just choose one arbitrarily -- not the best, but at least +// it's simple. */ +// +// lk = (Lock*)HG_(anyElementOfWS)( univ_lsets, lset_old ); +// if (0) VG_(printf)("lossage %ld %p\n", +// HG_(cardinalityWS)( univ_lsets, lset_old), lk ); +// if (lk->appeared_at) { +// if (ga_to_lastlock == NULL) +// ga_to_lastlock = VG_(newFM)( HG_(zalloc), "hg.rlll.1", HG_(free), NULL ); +// VG_(addToFM)( ga_to_lastlock, ga_of_access, (Word)lk->appeared_at ); +// stats__ga_LL_adds++; +// } +//} +// +///* This queries the table (ga_to_lastlock) made by +// record_last_lock_lossage, when constructing error messages. It +// attempts to find the ExeContext of the allocation or initialisation +// point for the lossage lock associated with 'ga'. */ +// +//static ExeContext* maybe_get_lastlock_initpoint ( Addr ga ) +//{ +// ExeContext* ec_hint = NULL; +// if (ga_to_lastlock != NULL +// && VG_(lookupFM)(ga_to_lastlock, +// NULL, (Word*)&ec_hint, ga)) { +// tl_assert(ec_hint != NULL); +// return ec_hint; +// } else { +// return NULL; +// } +//} + + +/*----------------------------------------------------------------*/ +/*--- Shadow value and address range handlers ---*/ +/*----------------------------------------------------------------*/ + +static void laog__pre_thread_acquires_lock ( Thread*, Lock* ); /* fwds */ +//static void laog__handle_lock_deletions ( WordSetID ); /* fwds */ +static inline Thread* get_current_Thread ( void ); /* fwds */ +__attribute__((noinline)) +static void laog__handle_one_lock_deletion ( Lock* lk ); /* fwds */ + + +/* Block-copy states (needed for implementing realloc()). */ +static void shadow_mem_copy_range ( Addr src, Addr dst, SizeT len ) +{ + libhb_copy_shadow_state( src, dst, len ); +} + +static void shadow_mem_read_range ( Thread* thr, Addr a, SizeT len ) +{ + Thr* hbthr = thr->hbthr; + tl_assert(hbthr); + LIBHB_READ_N(hbthr, a, len); +} + +static void shadow_mem_write_range ( Thread* thr, Addr a, SizeT len ) { + Thr* hbthr = thr->hbthr; + tl_assert(hbthr); + LIBHB_WRITE_N(hbthr, a, len); +} + +static void shadow_mem_make_New ( Thread* thr, Addr a, SizeT len ) +{ + libhb_range_new( thr->hbthr, a, len ); +} + +static void shadow_mem_make_NoAccess ( Thread* thr, Addr aIN, SizeT len ) +{ + if (0 && len > 500) + VG_(printf)("make NoAccess ( %#lx, %ld )\n", aIN, len ); + libhb_range_noaccess( thr->hbthr, aIN, len ); +} + + +/*----------------------------------------------------------------*/ +/*--- Event handlers (evh__* functions) ---*/ +/*--- plus helpers (evhH__* functions) ---*/ +/*----------------------------------------------------------------*/ + +/*--------- Event handler helpers (evhH__* functions) ---------*/ + +/* Create a new segment for 'thr', making it depend (.prev) on its + existing segment, bind together the SegmentID and Segment, and + return both of them. Also update 'thr' so it references the new + Segment. */ +//zz static +//zz void evhH__start_new_segment_for_thread ( /*OUT*/SegmentID* new_segidP, +//zz /*OUT*/Segment** new_segP, +//zz Thread* thr ) +//zz { +//zz Segment* cur_seg; +//zz tl_assert(new_segP); +//zz tl_assert(new_segidP); +//zz tl_assert(HG_(is_sane_Thread)(thr)); +//zz cur_seg = map_segments_lookup( thr->csegid ); +//zz tl_assert(cur_seg); +//zz tl_assert(cur_seg->thr == thr); /* all sane segs should point back +//zz at their owner thread. */ +//zz *new_segP = mk_Segment( thr, cur_seg, NULL/*other*/ ); +//zz *new_segidP = alloc_SegmentID(); +//zz map_segments_add( *new_segidP, *new_segP ); +//zz thr->csegid = *new_segidP; +//zz } + + +/* The lock at 'lock_ga' has acquired a writer. Make all necessary + updates, and also do all possible error checks. */ +static +void evhH__post_thread_w_acquires_lock ( Thread* thr, + LockKind lkk, Addr lock_ga ) +{ + Lock* lk; + + /* Basically what we need to do is call lockN_acquire_writer. + However, that will barf if any 'invalid' lock states would + result. Therefore check before calling. Side effect is that + 'HG_(is_sane_LockN)(lk)' is both a pre- and post-condition of this + routine. + + Because this routine is only called after successful lock + acquisition, we should not be asked to move the lock into any + invalid states. Requests to do so are bugs in libpthread, since + that should have rejected any such requests. */ + + tl_assert(HG_(is_sane_Thread)(thr)); + /* Try to find the lock. If we can't, then create a new one with + kind 'lkk'. */ + lk = map_locks_lookup_or_create( + lkk, lock_ga, map_threads_reverse_lookup_SLOW(thr) ); + tl_assert( HG_(is_sane_LockN)(lk) ); + + /* check libhb level entities exist */ + tl_assert(thr->hbthr); + tl_assert(lk->hbso); + + if (lk->heldBy == NULL) { + /* the lock isn't held. Simple. */ + tl_assert(!lk->heldW); + lockN_acquire_writer( lk, thr ); + /* acquire a dependency from the lock's VCs */ + libhb_so_recv( thr->hbthr, lk->hbso, True/*strong_recv*/ ); + goto noerror; + } + + /* So the lock is already held. If held as a r-lock then + libpthread must be buggy. */ + tl_assert(lk->heldBy); + if (!lk->heldW) { + HG_(record_error_Misc)( + thr, "Bug in libpthread: write lock " + "granted on rwlock which is currently rd-held"); + goto error; + } + + /* So the lock is held in w-mode. If it's held by some other + thread, then libpthread must be buggy. */ + tl_assert(VG_(sizeUniqueBag)(lk->heldBy) == 1); /* from precondition */ + + if (thr != (Thread*)VG_(anyElementOfBag)(lk->heldBy)) { + HG_(record_error_Misc)( + thr, "Bug in libpthread: write lock " + "granted on mutex/rwlock which is currently " + "wr-held by a different thread"); + goto error; + } + + /* So the lock is already held in w-mode by 'thr'. That means this + is an attempt to lock it recursively, which is only allowable + for LK_mbRec kinded locks. Since this routine is called only + once the lock has been acquired, this must also be a libpthread + bug. */ + if (lk->kind != LK_mbRec) { + HG_(record_error_Misc)( + thr, "Bug in libpthread: recursive write lock " + "granted on mutex/wrlock which does not " + "support recursion"); + goto error; + } + + /* So we are recursively re-locking a lock we already w-hold. */ + lockN_acquire_writer( lk, thr ); + /* acquire a dependency from the lock's VC. Probably pointless, + but also harmless. */ + libhb_so_recv( thr->hbthr, lk->hbso, True/*strong_recv*/ ); + goto noerror; + + noerror: + /* check lock order acquisition graph, and update. This has to + happen before the lock is added to the thread's locksetA/W. */ + laog__pre_thread_acquires_lock( thr, lk ); + /* update the thread's held-locks set */ + thr->locksetA = HG_(addToWS)( univ_lsets, thr->locksetA, (Word)lk ); + thr->locksetW = HG_(addToWS)( univ_lsets, thr->locksetW, (Word)lk ); + /* fall through */ + + error: + tl_assert(HG_(is_sane_LockN)(lk)); +} + + +/* The lock at 'lock_ga' has acquired a reader. Make all necessary + updates, and also do all possible error checks. */ +static +void evhH__post_thread_r_acquires_lock ( Thread* thr, + LockKind lkk, Addr lock_ga ) +{ + Lock* lk; + + /* Basically what we need to do is call lockN_acquire_reader. + However, that will barf if any 'invalid' lock states would + result. Therefore check before calling. Side effect is that + 'HG_(is_sane_LockN)(lk)' is both a pre- and post-condition of this + routine. + + Because this routine is only called after successful lock + acquisition, we should not be asked to move the lock into any + invalid states. Requests to do so are bugs in libpthread, since + that should have rejected any such requests. */ + + tl_assert(HG_(is_sane_Thread)(thr)); + /* Try to find the lock. If we can't, then create a new one with + kind 'lkk'. Only a reader-writer lock can be read-locked, + hence the first assertion. */ + tl_assert(lkk == LK_rdwr); + lk = map_locks_lookup_or_create( + lkk, lock_ga, map_threads_reverse_lookup_SLOW(thr) ); + tl_assert( HG_(is_sane_LockN)(lk) ); + + /* check libhb level entities exist */ + tl_assert(thr->hbthr); + tl_assert(lk->hbso); + + if (lk->heldBy == NULL) { + /* the lock isn't held. Simple. */ + tl_assert(!lk->heldW); + lockN_acquire_reader( lk, thr ); + /* acquire a dependency from the lock's VC */ + libhb_so_recv( thr->hbthr, lk->hbso, False/*!strong_recv*/ ); + goto noerror; + } + + /* So the lock is already held. If held as a w-lock then + libpthread must be buggy. */ + tl_assert(lk->heldBy); + if (lk->heldW) { + HG_(record_error_Misc)( thr, "Bug in libpthread: read lock " + "granted on rwlock which is " + "currently wr-held"); + goto error; + } + + /* Easy enough. In short anybody can get a read-lock on a rwlock + provided it is either unlocked or already in rd-held. */ + lockN_acquire_reader( lk, thr ); + /* acquire a dependency from the lock's VC. Probably pointless, + but also harmless. */ + libhb_so_recv( thr->hbthr, lk->hbso, False/*!strong_recv*/ ); + goto noerror; + + noerror: + /* check lock order acquisition graph, and update. This has to + happen before the lock is added to the thread's locksetA/W. */ + laog__pre_thread_acquires_lock( thr, lk ); + /* update the thread's held-locks set */ + thr->locksetA = HG_(addToWS)( univ_lsets, thr->locksetA, (Word)lk ); + /* but don't update thr->locksetW, since lk is only rd-held */ + /* fall through */ + + error: + tl_assert(HG_(is_sane_LockN)(lk)); +} + + +/* The lock at 'lock_ga' is just about to be unlocked. Make all + necessary updates, and also do all possible error checks. */ +static +void evhH__pre_thread_releases_lock ( Thread* thr, + Addr lock_ga, Bool isRDWR ) +{ + Lock* lock; + Word n; + Bool was_heldW; + + /* This routine is called prior to a lock release, before + libpthread has had a chance to validate the call. Hence we need + to detect and reject any attempts to move the lock into an + invalid state. Such attempts are bugs in the client. + + isRDWR is True if we know from the wrapper context that lock_ga + should refer to a reader-writer lock, and is False if [ditto] + lock_ga should refer to a standard mutex. */ + + tl_assert(HG_(is_sane_Thread)(thr)); + lock = map_locks_maybe_lookup( lock_ga ); + + if (!lock) { + /* We know nothing about a lock at 'lock_ga'. Nevertheless + the client is trying to unlock it. So complain, then ignore + the attempt. */ + HG_(record_error_UnlockBogus)( thr, lock_ga ); + return; + } + + tl_assert(lock->guestaddr == lock_ga); + tl_assert(HG_(is_sane_LockN)(lock)); + + if (isRDWR && lock->kind != LK_rdwr) { + HG_(record_error_Misc)( thr, "pthread_rwlock_unlock with a " + "pthread_mutex_t* argument " ); + } + if ((!isRDWR) && lock->kind == LK_rdwr) { + HG_(record_error_Misc)( thr, "pthread_mutex_unlock with a " + "pthread_rwlock_t* argument " ); + } + + if (!lock->heldBy) { + /* The lock is not held. This indicates a serious bug in the + client. */ + tl_assert(!lock->heldW); + HG_(record_error_UnlockUnlocked)( thr, lock ); + tl_assert(!HG_(elemWS)( univ_lsets, thr->locksetA, (Word)lock )); + tl_assert(!HG_(elemWS)( univ_lsets, thr->locksetW, (Word)lock )); + goto error; + } + + /* test just above dominates */ + tl_assert(lock->heldBy); + was_heldW = lock->heldW; + + /* The lock is held. Is this thread one of the holders? If not, + report a bug in the client. */ + n = VG_(elemBag)( lock->heldBy, (Word)thr ); + tl_assert(n >= 0); + if (n == 0) { + /* We are not a current holder of the lock. This is a bug in + the guest, and (per POSIX pthread rules) the unlock + attempt will fail. So just complain and do nothing + else. */ + Thread* realOwner = (Thread*)VG_(anyElementOfBag)( lock->heldBy ); + tl_assert(HG_(is_sane_Thread)(realOwner)); + tl_assert(realOwner != thr); + tl_assert(!HG_(elemWS)( univ_lsets, thr->locksetA, (Word)lock )); + tl_assert(!HG_(elemWS)( univ_lsets, thr->locksetW, (Word)lock )); + HG_(record_error_UnlockForeign)( thr, realOwner, lock ); + goto error; + } + + /* Ok, we hold the lock 'n' times. */ + tl_assert(n >= 1); + + lockN_release( lock, thr ); + + n--; + tl_assert(n >= 0); + + if (n > 0) { + tl_assert(lock->heldBy); + tl_assert(n == VG_(elemBag)( lock->heldBy, (Word)thr )); + /* We still hold the lock. So either it's a recursive lock + or a rwlock which is currently r-held. */ + tl_assert(lock->kind == LK_mbRec + || (lock->kind == LK_rdwr && !lock->heldW)); + tl_assert(HG_(elemWS)( univ_lsets, thr->locksetA, (Word)lock )); + if (lock->heldW) + tl_assert(HG_(elemWS)( univ_lsets, thr->locksetW, (Word)lock )); + else + tl_assert(!HG_(elemWS)( univ_lsets, thr->locksetW, (Word)lock )); + } else { + /* We no longer hold the lock. */ + tl_assert(!lock->heldBy); + tl_assert(lock->heldW == False); + //if (lock->heldBy) { + // tl_assert(0 == VG_(elemBag)( lock->heldBy, (Word)thr )); + //} + /* update this thread's lockset accordingly. */ + thr->locksetA + = HG_(delFromWS)( univ_lsets, thr->locksetA, (Word)lock ); + thr->locksetW + = HG_(delFromWS)( univ_lsets, thr->locksetW, (Word)lock ); + /* push our VC into the lock */ + tl_assert(thr->hbthr); + tl_assert(lock->hbso); + /* If the lock was previously W-held, then we want to do a + strong send, and if previously R-held, then a weak send. */ + libhb_so_send( thr->hbthr, lock->hbso, was_heldW ); + } + /* fall through */ + + error: + tl_assert(HG_(is_sane_LockN)(lock)); +} + + +/* ---------------------------------------------------------- */ +/* -------- Event handlers proper (evh__* functions) -------- */ +/* ---------------------------------------------------------- */ + +/* What is the Thread* for the currently running thread? This is + absolutely performance critical. We receive notifications from the + core for client code starts/stops, and cache the looked-up result + in 'current_Thread'. Hence, for the vast majority of requests, + finding the current thread reduces to a read of a global variable, + provided get_current_Thread_in_C_C is inlined. + + Outside of client code, current_Thread is NULL, and presumably + any uses of it will cause a segfault. Hence: + + - for uses definitely within client code, use + get_current_Thread_in_C_C. + + - for all other uses, use get_current_Thread. +*/ + +static Thread* current_Thread = NULL; + +static void evh__start_client_code ( ThreadId tid, ULong nDisp ) { + if (0) VG_(printf)("start %d %llu\n", (Int)tid, nDisp); + tl_assert(current_Thread == NULL); + current_Thread = map_threads_lookup( tid ); + tl_assert(current_Thread != NULL); +} +static void evh__stop_client_code ( ThreadId tid, ULong nDisp ) { + if (0) VG_(printf)(" stop %d %llu\n", (Int)tid, nDisp); + tl_assert(current_Thread != NULL); + current_Thread = NULL; + libhb_maybe_GC(); +} +static inline Thread* get_current_Thread_in_C_C ( void ) { + return current_Thread; +} +static inline Thread* get_current_Thread ( void ) { + ThreadId coretid; + Thread* thr; + thr = get_current_Thread_in_C_C(); + if (LIKELY(thr)) + return thr; + /* evidently not in client code. Do it the slow way. */ + coretid = VG_(get_running_tid)(); + /* FIXME: get rid of the following kludge. It exists because + evh__new_mem is called during initialisation (as notification + of initial memory layout) and VG_(get_running_tid)() returns + VG_INVALID_THREADID at that point. */ + if (coretid == VG_INVALID_THREADID) + coretid = 1; /* KLUDGE */ + thr = map_threads_lookup( coretid ); + return thr; +} + +static +void evh__new_mem ( Addr a, SizeT len ) { + if (SHOW_EVENTS >= 2) + VG_(printf)("evh__new_mem(%p, %lu)\n", (void*)a, len ); + shadow_mem_make_New( get_current_Thread(), a, len ); + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__new_mem-post"); +} + +static +void evh__new_mem_w_tid ( Addr a, SizeT len, ThreadId tid ) { + if (SHOW_EVENTS >= 2) + VG_(printf)("evh__new_mem_w_tid(%p, %lu)\n", (void*)a, len ); + shadow_mem_make_New( get_current_Thread(), a, len ); + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__new_mem_w_tid-post"); +} + +static +void evh__new_mem_w_perms ( Addr a, SizeT len, + Bool rr, Bool ww, Bool xx, ULong di_handle ) { + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__new_mem_w_perms(%p, %lu, %d,%d,%d)\n", + (void*)a, len, (Int)rr, (Int)ww, (Int)xx ); + if (rr || ww || xx) + shadow_mem_make_New( get_current_Thread(), a, len ); + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__new_mem_w_perms-post"); +} + +static +void evh__set_perms ( Addr a, SizeT len, + Bool rr, Bool ww, Bool xx ) { + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__set_perms(%p, %lu, %d,%d,%d)\n", + (void*)a, len, (Int)rr, (Int)ww, (Int)xx ); + /* Hmm. What should we do here, that actually makes any sense? + Let's say: if neither readable nor writable, then declare it + NoAccess, else leave it alone. */ + if (!(rr || ww)) + shadow_mem_make_NoAccess( get_current_Thread(), a, len ); + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__set_perms-post"); +} + +static +void evh__die_mem ( Addr a, SizeT len ) { + if (SHOW_EVENTS >= 2) + VG_(printf)("evh__die_mem(%p, %lu)\n", (void*)a, len ); + shadow_mem_make_NoAccess( get_current_Thread(), a, len ); + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__die_mem-post"); +} + +static +void evh__pre_thread_ll_create ( ThreadId parent, ThreadId child ) +{ + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__pre_thread_ll_create(p=%d, c=%d)\n", + (Int)parent, (Int)child ); + + if (parent != VG_INVALID_THREADID) { + Thread* thr_p; + Thread* thr_c; + Thr* hbthr_p; + Thr* hbthr_c; + + tl_assert(HG_(is_sane_ThreadId)(parent)); + tl_assert(HG_(is_sane_ThreadId)(child)); + tl_assert(parent != child); + + thr_p = map_threads_maybe_lookup( parent ); + thr_c = map_threads_maybe_lookup( child ); + + tl_assert(thr_p != NULL); + tl_assert(thr_c == NULL); + + hbthr_p = thr_p->hbthr; + tl_assert(hbthr_p != NULL); + tl_assert( libhb_get_Thr_opaque(hbthr_p) == thr_p ); + + hbthr_c = libhb_create ( hbthr_p ); + + /* Create a new thread record for the child. */ + /* a Thread for the new thread ... */ + thr_c = mk_Thread( hbthr_c ); + tl_assert( libhb_get_Thr_opaque(hbthr_c) == NULL ); + libhb_set_Thr_opaque(hbthr_c, thr_c); + + /* and bind it in the thread-map table */ + map_threads[child] = thr_c; + tl_assert(thr_c->coretid == VG_INVALID_THREADID); + thr_c->coretid = child; + + /* Record where the parent is so we can later refer to this in + error messages. + + On amd64-linux, this entails a nasty glibc-2.5 specific hack. + The stack snapshot is taken immediately after the parent has + returned from its sys_clone call. Unfortunately there is no + unwind info for the insn following "syscall" - reading the + glibc sources confirms this. So we ask for a snapshot to be + taken as if RIP was 3 bytes earlier, in a place where there + is unwind info. Sigh. + */ + { Word first_ip_delta = 0; +# if defined(VGP_amd64_linux) + first_ip_delta = -3; +# endif + thr_c->created_at = VG_(record_ExeContext)(parent, first_ip_delta); + } + } + + if (HG_(clo_sanity_flags) & SCE_THREADS) + all__sanity_check("evh__pre_thread_create-post"); +} + +static +void evh__pre_thread_ll_exit ( ThreadId quit_tid ) +{ + Int nHeld; + Thread* thr_q; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__pre_thread_ll_exit(thr=%d)\n", + (Int)quit_tid ); + + /* quit_tid has disappeared without joining to any other thread. + Therefore there is no synchronisation event associated with its + exit and so we have to pretty much treat it as if it was still + alive but mysteriously making no progress. That is because, if + we don't know when it really exited, then we can never say there + is a point in time when we're sure the thread really has + finished, and so we need to consider the possibility that it + lingers indefinitely and continues to interact with other + threads. */ + /* However, it might have rendezvous'd with a thread that called + pthread_join with this one as arg, prior to this point (that's + how NPTL works). In which case there has already been a prior + sync event. So in any case, just let the thread exit. On NPTL, + all thread exits go through here. */ + tl_assert(HG_(is_sane_ThreadId)(quit_tid)); + thr_q = map_threads_maybe_lookup( quit_tid ); + tl_assert(thr_q != NULL); + + /* Complain if this thread holds any locks. */ + nHeld = HG_(cardinalityWS)( univ_lsets, thr_q->locksetA ); + tl_assert(nHeld >= 0); + if (nHeld > 0) { + HChar buf[80]; + VG_(sprintf)(buf, "Exiting thread still holds %d lock%s", + nHeld, nHeld > 1 ? "s" : ""); + HG_(record_error_Misc)( thr_q, buf ); + } + + /* About the only thing we do need to do is clear the map_threads + entry, in order that the Valgrind core can re-use it. */ + tl_assert(thr_q->coretid == quit_tid); + thr_q->coretid = VG_INVALID_THREADID; + map_threads_delete( quit_tid ); + + if (HG_(clo_sanity_flags) & SCE_THREADS) + all__sanity_check("evh__pre_thread_ll_exit-post"); +} + + +static +void evh__HG_PTHREAD_JOIN_POST ( ThreadId stay_tid, Thread* quit_thr ) +{ + Thread* thr_s; + Thread* thr_q; + Thr* hbthr_s; + Thr* hbthr_q; + SO* so; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__post_thread_join(stayer=%d, quitter=%p)\n", + (Int)stay_tid, quit_thr ); + + tl_assert(HG_(is_sane_ThreadId)(stay_tid)); + + thr_s = map_threads_maybe_lookup( stay_tid ); + thr_q = quit_thr; + tl_assert(thr_s != NULL); + tl_assert(thr_q != NULL); + tl_assert(thr_s != thr_q); + + hbthr_s = thr_s->hbthr; + hbthr_q = thr_q->hbthr; + tl_assert(hbthr_s != hbthr_q); + tl_assert( libhb_get_Thr_opaque(hbthr_s) == thr_s ); + tl_assert( libhb_get_Thr_opaque(hbthr_q) == thr_q ); + + /* Allocate a temporary synchronisation object and use it to send + an imaginary message from the quitter to the stayer, the purpose + being to generate a dependence from the quitter to the + stayer. */ + so = libhb_so_alloc(); + tl_assert(so); + libhb_so_send(hbthr_q, so, True/*strong_send*/); + libhb_so_recv(hbthr_s, so, True/*strong_recv*/); + libhb_so_dealloc(so); + + /* evh__pre_thread_ll_exit issues an error message if the exiting + thread holds any locks. No need to check here. */ + + /* This holds because, at least when using NPTL as the thread + library, we should be notified the low level thread exit before + we hear of any join event on it. The low level exit + notification feeds through into evh__pre_thread_ll_exit, + which should clear the map_threads entry for it. Hence we + expect there to be no map_threads entry at this point. */ + tl_assert( map_threads_maybe_reverse_lookup_SLOW(thr_q) + == VG_INVALID_THREADID); + + if (HG_(clo_sanity_flags) & SCE_THREADS) + all__sanity_check("evh__post_thread_join-post"); +} + +static +void evh__pre_mem_read ( CorePart part, ThreadId tid, Char* s, + Addr a, SizeT size) { + if (SHOW_EVENTS >= 2 + || (SHOW_EVENTS >= 1 && size != 1)) + VG_(printf)("evh__pre_mem_read(ctid=%d, \"%s\", %p, %lu)\n", + (Int)tid, s, (void*)a, size ); + shadow_mem_read_range( map_threads_lookup(tid), a, size); + if (size >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__pre_mem_read-post"); +} + +static +void evh__pre_mem_read_asciiz ( CorePart part, ThreadId tid, + Char* s, Addr a ) { + Int len; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__pre_mem_asciiz(ctid=%d, \"%s\", %p)\n", + (Int)tid, s, (void*)a ); + // FIXME: think of a less ugly hack + len = VG_(strlen)( (Char*) a ); + shadow_mem_read_range( map_threads_lookup(tid), a, len+1 ); + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__pre_mem_read_asciiz-post"); +} + +static +void evh__pre_mem_write ( CorePart part, ThreadId tid, Char* s, + Addr a, SizeT size ) { + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__pre_mem_write(ctid=%d, \"%s\", %p, %lu)\n", + (Int)tid, s, (void*)a, size ); + shadow_mem_write_range( map_threads_lookup(tid), a, size); + if (size >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__pre_mem_write-post"); +} + +static +void evh__new_mem_heap ( Addr a, SizeT len, Bool is_inited ) { + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__new_mem_heap(%p, %lu, inited=%d)\n", + (void*)a, len, (Int)is_inited ); + // FIXME: this is kinda stupid + if (is_inited) { + shadow_mem_make_New(get_current_Thread(), a, len); + } else { + shadow_mem_make_New(get_current_Thread(), a, len); + } + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__pre_mem_read-post"); +} + +static +void evh__die_mem_heap ( Addr a, SizeT len ) { + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__die_mem_heap(%p, %lu)\n", (void*)a, len ); + shadow_mem_make_NoAccess( get_current_Thread(), a, len ); + if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) + all__sanity_check("evh__pre_mem_read-post"); +} + +static VG_REGPARM(1) +void evh__mem_help_read_1(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_READ_1(hbthr, a); +} + +static VG_REGPARM(1) +void evh__mem_help_read_2(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_READ_2(hbthr, a); +} + +static VG_REGPARM(1) +void evh__mem_help_read_4(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_READ_4(hbthr, a); +} + +static VG_REGPARM(1) +void evh__mem_help_read_8(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_READ_8(hbthr, a); +} + +static VG_REGPARM(2) +void evh__mem_help_read_N(Addr a, SizeT size) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_READ_N(hbthr, a, size); +} + +static VG_REGPARM(1) +void evh__mem_help_write_1(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_WRITE_1(hbthr, a); +} + +static VG_REGPARM(1) +void evh__mem_help_write_2(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_WRITE_2(hbthr, a); +} + +static VG_REGPARM(1) +void evh__mem_help_write_4(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_WRITE_4(hbthr, a); +} + +static VG_REGPARM(1) +void evh__mem_help_write_8(Addr a) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_WRITE_8(hbthr, a); +} + +static VG_REGPARM(2) +void evh__mem_help_write_N(Addr a, SizeT size) { + Thread* thr = get_current_Thread_in_C_C(); + Thr* hbthr = thr->hbthr; + LIBHB_WRITE_N(hbthr, a, size); +} + +//static void evh__bus_lock(void) { +// Thread* thr; +// if (0) VG_(printf)("evh__bus_lock()\n"); +// thr = get_current_Thread(); +// tl_assert(thr); /* cannot fail - Thread* must already exist */ +// evhH__post_thread_w_acquires_lock( thr, LK_nonRec, (Addr)&__bus_lock ); +//} +//static void evh__bus_unlock(void) { +// Thread* thr; +// if (0) VG_(printf)("evh__bus_unlock()\n"); +// thr = get_current_Thread(); +// tl_assert(thr); /* cannot fail - Thread* must already exist */ +// evhH__pre_thread_releases_lock( thr, (Addr)&__bus_lock, False/*!isRDWR*/ ); +//} + +/* ------------------------------------------------------- */ +/* -------------- events to do with mutexes -------------- */ +/* ------------------------------------------------------- */ + +/* EXPOSITION only: by intercepting lock init events we can show the + user where the lock was initialised, rather than only being able to + show where it was first locked. Intercepting lock initialisations + is not necessary for the basic operation of the race checker. */ +static +void evh__HG_PTHREAD_MUTEX_INIT_POST( ThreadId tid, + void* mutex, Word mbRec ) +{ + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_MUTEX_INIT_POST(ctid=%d, mbRec=%ld, %p)\n", + (Int)tid, mbRec, (void*)mutex ); + tl_assert(mbRec == 0 || mbRec == 1); + map_locks_lookup_or_create( mbRec ? LK_mbRec : LK_nonRec, + (Addr)mutex, tid ); + if (HG_(clo_sanity_flags) & SCE_LOCKS) + all__sanity_check("evh__hg_PTHREAD_MUTEX_INIT_POST"); +} + +static +void evh__HG_PTHREAD_MUTEX_DESTROY_PRE( ThreadId tid, void* mutex ) +{ + Thread* thr; + Lock* lk; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_MUTEX_DESTROY_PRE(ctid=%d, %p)\n", + (Int)tid, (void*)mutex ); + + thr = map_threads_maybe_lookup( tid ); + /* cannot fail - Thread* must already exist */ + tl_assert( HG_(is_sane_Thread)(thr) ); + + lk = map_locks_maybe_lookup( (Addr)mutex ); + + if (lk == NULL || (lk->kind != LK_nonRec && lk->kind != LK_mbRec)) { + HG_(record_error_Misc)( + thr, "pthread_mutex_destroy with invalid argument" ); + } + + if (lk) { + tl_assert( HG_(is_sane_LockN)(lk) ); + tl_assert( lk->guestaddr == (Addr)mutex ); + if (lk->heldBy) { + /* Basically act like we unlocked the lock */ + HG_(record_error_Misc)( + thr, "pthread_mutex_destroy of a locked mutex" ); + /* remove lock from locksets of all owning threads */ + remove_Lock_from_locksets_of_all_owning_Threads( lk ); + VG_(deleteBag)( lk->heldBy ); + lk->heldBy = NULL; + lk->heldW = False; + lk->acquired_at = NULL; + } + tl_assert( !lk->heldBy ); + tl_assert( HG_(is_sane_LockN)(lk) ); + + laog__handle_one_lock_deletion(lk); + map_locks_delete( lk->guestaddr ); + del_LockN( lk ); + } + + if (HG_(clo_sanity_flags) & SCE_LOCKS) + all__sanity_check("evh__hg_PTHREAD_MUTEX_DESTROY_PRE"); +} + +static void evh__HG_PTHREAD_MUTEX_LOCK_PRE ( ThreadId tid, + void* mutex, Word isTryLock ) +{ + /* Just check the mutex is sane; nothing else to do. */ + // 'mutex' may be invalid - not checked by wrapper + Thread* thr; + Lock* lk; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_MUTEX_LOCK_PRE(ctid=%d, mutex=%p)\n", + (Int)tid, (void*)mutex ); + + tl_assert(isTryLock == 0 || isTryLock == 1); + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + lk = map_locks_maybe_lookup( (Addr)mutex ); + + if (lk && (lk->kind == LK_rdwr)) { + HG_(record_error_Misc)( thr, "pthread_mutex_lock with a " + "pthread_rwlock_t* argument " ); + } + + if ( lk + && isTryLock == 0 + && (lk->kind == LK_nonRec || lk->kind == LK_rdwr) + && lk->heldBy + && lk->heldW + && VG_(elemBag)( lk->heldBy, (Word)thr ) > 0 ) { + /* uh, it's a non-recursive lock and we already w-hold it, and + this is a real lock operation (not a speculative "tryLock" + kind of thing). Duh. Deadlock coming up; but at least + produce an error message. */ + HG_(record_error_Misc)( thr, "Attempt to re-lock a " + "non-recursive lock I already hold" ); + } +} + +static void evh__HG_PTHREAD_MUTEX_LOCK_POST ( ThreadId tid, void* mutex ) +{ + // only called if the real library call succeeded - so mutex is sane + Thread* thr; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_MUTEX_LOCK_POST(ctid=%d, mutex=%p)\n", + (Int)tid, (void*)mutex ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + evhH__post_thread_w_acquires_lock( + thr, + LK_mbRec, /* if not known, create new lock with this LockKind */ + (Addr)mutex + ); +} + +static void evh__HG_PTHREAD_MUTEX_UNLOCK_PRE ( ThreadId tid, void* mutex ) +{ + // 'mutex' may be invalid - not checked by wrapper + Thread* thr; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_MUTEX_UNLOCK_PRE(ctid=%d, mutex=%p)\n", + (Int)tid, (void*)mutex ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + evhH__pre_thread_releases_lock( thr, (Addr)mutex, False/*!isRDWR*/ ); +} + +static void evh__HG_PTHREAD_MUTEX_UNLOCK_POST ( ThreadId tid, void* mutex ) +{ + // only called if the real library call succeeded - so mutex is sane + Thread* thr; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_MUTEX_UNLOCK_POST(ctid=%d, mutex=%p)\n", + (Int)tid, (void*)mutex ); + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + // anything we should do here? +} + + +/* ----------------------------------------------------- */ +/* --------------- events to do with CVs --------------- */ +/* ----------------------------------------------------- */ + +/* A mapping from CV to the SO associated with it. When the CV is + signalled/broadcasted upon, we do a 'send' into the SO, and when a + wait on it completes, we do a 'recv' from the SO. This is believed + to give the correct happens-before events arising from CV + signallings/broadcasts. +*/ + +/* pthread_mutex_cond* -> SO* */ +static WordFM* map_cond_to_SO = NULL; + +static void map_cond_to_SO_INIT ( void ) { + if (UNLIKELY(map_cond_to_SO == NULL)) { + map_cond_to_SO = VG_(newFM)( HG_(zalloc), + "hg.mctSI.1", HG_(free), NULL ); + tl_assert(map_cond_to_SO != NULL); + } +} + +static SO* map_cond_to_SO_lookup_or_alloc ( void* cond ) { + UWord key, val; + map_cond_to_SO_INIT(); + if (VG_(lookupFM)( map_cond_to_SO, &key, &val, (UWord)cond )) { + tl_assert(key == (UWord)cond); + return (SO*)val; + } else { + SO* so = libhb_so_alloc(); + VG_(addToFM)( map_cond_to_SO, (UWord)cond, (UWord)so ); + return so; + } +} + +static void map_cond_to_SO_delete ( void* cond ) { + UWord keyW, valW; + map_cond_to_SO_INIT(); + if (VG_(delFromFM)( map_cond_to_SO, &keyW, &valW, (UWord)cond )) { + SO* so = (SO*)valW; + tl_assert(keyW == (UWord)cond); + libhb_so_dealloc(so); + } +} + +static void evh__HG_PTHREAD_COND_SIGNAL_PRE ( ThreadId tid, void* cond ) +{ + /* 'tid' has signalled on 'cond'. As per the comment above, bind + cond to a SO if it is not already so bound, and 'send' on the + SO. This is later used by other thread(s) which successfully + exit from a pthread_cond_wait on the same cv; then they 'recv' + from the SO, thereby acquiring a dependency on this signalling + event. */ + Thread* thr; + SO* so; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_COND_SIGNAL_PRE(ctid=%d, cond=%p)\n", + (Int)tid, (void*)cond ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + // error-if: mutex is bogus + // error-if: mutex is not locked + + so = map_cond_to_SO_lookup_or_alloc( cond ); + tl_assert(so); + + libhb_so_send( thr->hbthr, so, True/*strong_send*/ ); +} + +/* returns True if it reckons 'mutex' is valid and held by this + thread, else False */ +static Bool evh__HG_PTHREAD_COND_WAIT_PRE ( ThreadId tid, + void* cond, void* mutex ) +{ + Thread* thr; + Lock* lk; + Bool lk_valid = True; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_COND_WAIT_PRE" + "(ctid=%d, cond=%p, mutex=%p)\n", + (Int)tid, (void*)cond, (void*)mutex ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + lk = map_locks_maybe_lookup( (Addr)mutex ); + + /* Check for stupid mutex arguments. There are various ways to be + a bozo. Only complain once, though, even if more than one thing + is wrong. */ + if (lk == NULL) { + lk_valid = False; + HG_(record_error_Misc)( + thr, + "pthread_cond_{timed}wait called with invalid mutex" ); + } else { + tl_assert( HG_(is_sane_LockN)(lk) ); + if (lk->kind == LK_rdwr) { + lk_valid = False; + HG_(record_error_Misc)( + thr, "pthread_cond_{timed}wait called with mutex " + "of type pthread_rwlock_t*" ); + } else + if (lk->heldBy == NULL) { + lk_valid = False; + HG_(record_error_Misc)( + thr, "pthread_cond_{timed}wait called with un-held mutex"); + } else + if (lk->heldBy != NULL + && VG_(elemBag)( lk->heldBy, (Word)thr ) == 0) { + lk_valid = False; + HG_(record_error_Misc)( + thr, "pthread_cond_{timed}wait called with mutex " + "held by a different thread" ); + } + } + + // error-if: cond is also associated with a different mutex + + return lk_valid; +} + +static void evh__HG_PTHREAD_COND_WAIT_POST ( ThreadId tid, + void* cond, void* mutex ) +{ + /* A pthread_cond_wait(cond, mutex) completed successfully. Find + the SO for this cond, and 'recv' from it so as to acquire a + dependency edge back to the signaller/broadcaster. */ + Thread* thr; + SO* so; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_COND_WAIT_POST" + "(ctid=%d, cond=%p, mutex=%p)\n", + (Int)tid, (void*)cond, (void*)mutex ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + // error-if: cond is also associated with a different mutex + + so = map_cond_to_SO_lookup_or_alloc( cond ); + tl_assert(so); + + if (!libhb_so_everSent(so)) { + /* Hmm. How can a wait on 'cond' succeed if nobody signalled + it? If this happened it would surely be a bug in the threads + library. Or one of those fabled "spurious wakeups". */ + HG_(record_error_Misc)( thr, "Bug in libpthread: pthread_cond_wait " + "succeeded on" + " without prior pthread_cond_post"); + } + + /* anyway, acquire a dependency on it. */ + libhb_so_recv( thr->hbthr, so, True/*strong_recv*/ ); +} + +static void evh__HG_PTHREAD_COND_DESTROY_PRE ( ThreadId tid, + void* cond ) +{ + /* Deal with destroy events. The only purpose is to free storage + associated with the CV, so as to avoid any possible resource + leaks. */ + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_COND_DESTROY_PRE" + "(ctid=%d, cond=%p)\n", + (Int)tid, (void*)cond ); + + map_cond_to_SO_delete( cond ); +} + + +/* ------------------------------------------------------- */ +/* -------------- events to do with rwlocks -------------- */ +/* ------------------------------------------------------- */ + +/* EXPOSITION only */ +static +void evh__HG_PTHREAD_RWLOCK_INIT_POST( ThreadId tid, void* rwl ) +{ + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_RWLOCK_INIT_POST(ctid=%d, %p)\n", + (Int)tid, (void*)rwl ); + map_locks_lookup_or_create( LK_rdwr, (Addr)rwl, tid ); + if (HG_(clo_sanity_flags) & SCE_LOCKS) + all__sanity_check("evh__hg_PTHREAD_RWLOCK_INIT_POST"); +} + +static +void evh__HG_PTHREAD_RWLOCK_DESTROY_PRE( ThreadId tid, void* rwl ) +{ + Thread* thr; + Lock* lk; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_RWLOCK_DESTROY_PRE(ctid=%d, %p)\n", + (Int)tid, (void*)rwl ); + + thr = map_threads_maybe_lookup( tid ); + /* cannot fail - Thread* must already exist */ + tl_assert( HG_(is_sane_Thread)(thr) ); + + lk = map_locks_maybe_lookup( (Addr)rwl ); + + if (lk == NULL || lk->kind != LK_rdwr) { + HG_(record_error_Misc)( + thr, "pthread_rwlock_destroy with invalid argument" ); + } + + if (lk) { + tl_assert( HG_(is_sane_LockN)(lk) ); + tl_assert( lk->guestaddr == (Addr)rwl ); + if (lk->heldBy) { + /* Basically act like we unlocked the lock */ + HG_(record_error_Misc)( + thr, "pthread_rwlock_destroy of a locked mutex" ); + /* remove lock from locksets of all owning threads */ + remove_Lock_from_locksets_of_all_owning_Threads( lk ); + VG_(deleteBag)( lk->heldBy ); + lk->heldBy = NULL; + lk->heldW = False; + lk->acquired_at = NULL; + } + tl_assert( !lk->heldBy ); + tl_assert( HG_(is_sane_LockN)(lk) ); + + laog__handle_one_lock_deletion(lk); + map_locks_delete( lk->guestaddr ); + del_LockN( lk ); + } + + if (HG_(clo_sanity_flags) & SCE_LOCKS) + all__sanity_check("evh__hg_PTHREAD_RWLOCK_DESTROY_PRE"); +} + +static +void evh__HG_PTHREAD_RWLOCK_LOCK_PRE ( ThreadId tid, + void* rwl, + Word isW, Word isTryLock ) +{ + /* Just check the rwl is sane; nothing else to do. */ + // 'rwl' may be invalid - not checked by wrapper + Thread* thr; + Lock* lk; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_RWLOCK_LOCK_PRE(ctid=%d, isW=%d, %p)\n", + (Int)tid, (Int)isW, (void*)rwl ); + + tl_assert(isW == 0 || isW == 1); /* assured us by wrapper */ + tl_assert(isTryLock == 0 || isTryLock == 1); /* assured us by wrapper */ + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + lk = map_locks_maybe_lookup( (Addr)rwl ); + if ( lk + && (lk->kind == LK_nonRec || lk->kind == LK_mbRec) ) { + /* Wrong kind of lock. Duh. */ + HG_(record_error_Misc)( + thr, "pthread_rwlock_{rd,rw}lock with a " + "pthread_mutex_t* argument " ); + } +} + +static +void evh__HG_PTHREAD_RWLOCK_LOCK_POST ( ThreadId tid, void* rwl, Word isW ) +{ + // only called if the real library call succeeded - so mutex is sane + Thread* thr; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_RWLOCK_LOCK_POST(ctid=%d, isW=%d, %p)\n", + (Int)tid, (Int)isW, (void*)rwl ); + + tl_assert(isW == 0 || isW == 1); /* assured us by wrapper */ + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + (isW ? evhH__post_thread_w_acquires_lock + : evhH__post_thread_r_acquires_lock)( + thr, + LK_rdwr, /* if not known, create new lock with this LockKind */ + (Addr)rwl + ); +} + +static void evh__HG_PTHREAD_RWLOCK_UNLOCK_PRE ( ThreadId tid, void* rwl ) +{ + // 'rwl' may be invalid - not checked by wrapper + Thread* thr; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_RWLOCK_UNLOCK_PRE(ctid=%d, rwl=%p)\n", + (Int)tid, (void*)rwl ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + evhH__pre_thread_releases_lock( thr, (Addr)rwl, True/*isRDWR*/ ); +} + +static void evh__HG_PTHREAD_RWLOCK_UNLOCK_POST ( ThreadId tid, void* rwl ) +{ + // only called if the real library call succeeded - so mutex is sane + Thread* thr; + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__hg_PTHREAD_RWLOCK_UNLOCK_POST(ctid=%d, rwl=%p)\n", + (Int)tid, (void*)rwl ); + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + // anything we should do here? +} + + +/* ---------------------------------------------------------- */ +/* -------------- events to do with semaphores -------------- */ +/* ---------------------------------------------------------- */ + +/* This is similar to but not identical to the handling for condition + variables. */ + +/* For each semaphore, we maintain a stack of SOs. When a 'post' + operation is done on a semaphore (unlocking, essentially), a new SO + is created for the posting thread, the posting thread does a strong + send to it (which merely installs the posting thread's VC in the + SO), and the SO is pushed on the semaphore's stack. + + Later, when a (probably different) thread completes 'wait' on the + semaphore, we pop a SO off the semaphore's stack (which should be + nonempty), and do a strong recv from it. This mechanism creates + dependencies between posters and waiters of the semaphore. + + It may not be necessary to use a stack - perhaps a bag of SOs would + do. But we do need to keep track of how many unused-up posts have + happened for the semaphore. + + Imagine T1 and T2 both post once on a semaphore S, and T3 waits + twice on S. T3 cannot complete its waits without both T1 and T2 + posting. The above mechanism will ensure that T3 acquires + dependencies on both T1 and T2. + + When a semaphore is initialised with value N, we do as if we'd + posted N times on the semaphore: basically create N SOs and do a + strong send to all of then. This allows up to N waits on the + semaphore to acquire a dependency on the initialisation point, + which AFAICS is the correct behaviour. + + We don't emit an error for DESTROY_PRE on a semaphore we don't know + about. We should. +*/ + +/* sem_t* -> XArray* SO* */ +static WordFM* map_sem_to_SO_stack = NULL; + +static void map_sem_to_SO_stack_INIT ( void ) { + if (map_sem_to_SO_stack == NULL) { + map_sem_to_SO_stack = VG_(newFM)( HG_(zalloc), "hg.mstSs.1", + HG_(free), NULL ); + tl_assert(map_sem_to_SO_stack != NULL); + } +} + +static void push_SO_for_sem ( void* sem, SO* so ) { + UWord keyW; + XArray* xa; + tl_assert(so); + map_sem_to_SO_stack_INIT(); + if (VG_(lookupFM)( map_sem_to_SO_stack, + &keyW, (UWord*)&xa, (UWord)sem )) { + tl_assert(keyW == (UWord)sem); + tl_assert(xa); + VG_(addToXA)( xa, &so ); + } else { + xa = VG_(newXA)( HG_(zalloc), "hg.pSfs.1", HG_(free), sizeof(SO*) ); + VG_(addToXA)( xa, &so ); + VG_(addToFM)( map_sem_to_SO_stack, (Word)sem, (Word)xa ); + } +} + +static SO* mb_pop_SO_for_sem ( void* sem ) { + UWord keyW; + XArray* xa; + SO* so; + map_sem_to_SO_stack_INIT(); + if (VG_(lookupFM)( map_sem_to_SO_stack, + &keyW, (UWord*)&xa, (UWord)sem )) { + /* xa is the stack for this semaphore. */ + Word sz; + tl_assert(keyW == (UWord)sem); + sz = VG_(sizeXA)( xa ); + tl_assert(sz >= 0); + if (sz == 0) + return NULL; /* odd, the stack is empty */ + so = *(SO**)VG_(indexXA)( xa, sz-1 ); + tl_assert(so); + VG_(dropTailXA)( xa, 1 ); + return so; + } else { + /* hmm, that's odd. No stack for this semaphore. */ + return NULL; + } +} + +static void evh__HG_POSIX_SEM_DESTROY_PRE ( ThreadId tid, void* sem ) +{ + UWord keyW, valW; + SO* so; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_POSIX_SEM_DESTROY_PRE(ctid=%d, sem=%p)\n", + (Int)tid, (void*)sem ); + + map_sem_to_SO_stack_INIT(); + + /* Empty out the semaphore's SO stack. This way of doing it is + stupid, but at least it's easy. */ + while (1) { + so = mb_pop_SO_for_sem( sem ); + if (!so) break; + libhb_so_dealloc(so); + } + + if (VG_(delFromFM)( map_sem_to_SO_stack, &keyW, &valW, (UWord)sem )) { + XArray* xa = (XArray*)valW; + tl_assert(keyW == (UWord)sem); + tl_assert(xa); + tl_assert(VG_(sizeXA)(xa) == 0); /* preceding loop just emptied it */ + VG_(deleteXA)(xa); + } +} + +static +void evh__HG_POSIX_SEM_INIT_POST ( ThreadId tid, void* sem, UWord value ) +{ + SO* so; + Thread* thr; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_POSIX_SEM_INIT_POST(ctid=%d, sem=%p, value=%lu)\n", + (Int)tid, (void*)sem, value ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + /* Empty out the semaphore's SO stack. This way of doing it is + stupid, but at least it's easy. */ + while (1) { + so = mb_pop_SO_for_sem( sem ); + if (!so) break; + libhb_so_dealloc(so); + } + + /* If we don't do this check, the following while loop runs us out + of memory for stupid initial values of 'value'. */ + if (value > 10000) { + HG_(record_error_Misc)( + thr, "sem_init: initial value exceeds 10000; using 10000" ); + value = 10000; + } + + /* Now create 'valid' new SOs for the thread, do a strong send to + each of them, and push them all on the stack. */ + for (; value > 0; value--) { + Thr* hbthr = thr->hbthr; + tl_assert(hbthr); + + so = libhb_so_alloc(); + libhb_so_send( hbthr, so, True/*strong send*/ ); + push_SO_for_sem( sem, so ); + } +} + +static void evh__HG_POSIX_SEM_POST_PRE ( ThreadId tid, void* sem ) +{ + /* 'tid' has posted on 'sem'. Create a new SO, do a strong send to + it (iow, write our VC into it, then tick ours), and push the SO + on on a stack of SOs associated with 'sem'. This is later used + by other thread(s) which successfully exit from a sem_wait on + the same sem; by doing a strong recv from SOs popped of the + stack, they acquire dependencies on the posting thread + segment(s). */ + + Thread* thr; + SO* so; + Thr* hbthr; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_POSIX_SEM_POST_PRE(ctid=%d, sem=%p)\n", + (Int)tid, (void*)sem ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + // error-if: sem is bogus + + hbthr = thr->hbthr; + tl_assert(hbthr); + + so = libhb_so_alloc(); + libhb_so_send( hbthr, so, True/*strong send*/ ); + push_SO_for_sem( sem, so ); +} + +static void evh__HG_POSIX_SEM_WAIT_POST ( ThreadId tid, void* sem ) +{ + /* A sem_wait(sem) completed successfully. Pop the posting-SO for + the 'sem' from this semaphore's SO-stack, and do a strong recv + from it. This creates a dependency back to one of the post-ers + for the semaphore. */ + + Thread* thr; + SO* so; + Thr* hbthr; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_POSIX_SEM_WAIT_POST(ctid=%d, sem=%p)\n", + (Int)tid, (void*)sem ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + // error-if: sem is bogus + + so = mb_pop_SO_for_sem( sem ); + + if (so) { + hbthr = thr->hbthr; + tl_assert(hbthr); + + libhb_so_recv( hbthr, so, True/*strong recv*/ ); + libhb_so_dealloc(so); + } else { + /* Hmm. How can a wait on 'sem' succeed if nobody posted to it? + If this happened it would surely be a bug in the threads + library. */ + HG_(record_error_Misc)( + thr, "Bug in libpthread: sem_wait succeeded on" + " semaphore without prior sem_post"); + } +} + + +/* -------------------------------------------------------- */ +/* -------------- events to do with barriers -------------- */ +/* -------------------------------------------------------- */ + +typedef + struct { + Bool initted; /* has it yet been initted by guest? */ + UWord size; /* declared size */ + XArray* waiting; /* XA of Thread*. # present is 0 .. .size */ + } + Bar; + +static Bar* new_Bar ( void ) { + Bar* bar = HG_(zalloc)( "hg.nB.1 (new_Bar)", sizeof(Bar) ); + tl_assert(bar); + /* all fields are zero */ + tl_assert(bar->initted == False); + return bar; +} + +static void delete_Bar ( Bar* bar ) { + tl_assert(bar); + if (bar->waiting) + VG_(deleteXA)(bar->waiting); + HG_(free)(bar); +} + +/* A mapping which stores auxiliary data for barriers. */ + +/* pthread_barrier_t* -> Bar* */ +static WordFM* map_barrier_to_Bar = NULL; + +static void map_barrier_to_Bar_INIT ( void ) { + if (UNLIKELY(map_barrier_to_Bar == NULL)) { + map_barrier_to_Bar = VG_(newFM)( HG_(zalloc), + "hg.mbtBI.1", HG_(free), NULL ); + tl_assert(map_barrier_to_Bar != NULL); + } +} + +static Bar* map_barrier_to_Bar_lookup_or_alloc ( void* barrier ) { + UWord key, val; + map_barrier_to_Bar_INIT(); + if (VG_(lookupFM)( map_barrier_to_Bar, &key, &val, (UWord)barrier )) { + tl_assert(key == (UWord)barrier); + return (Bar*)val; + } else { + Bar* bar = new_Bar(); + VG_(addToFM)( map_barrier_to_Bar, (UWord)barrier, (UWord)bar ); + return bar; + } +} + +static void map_barrier_to_Bar_delete ( void* barrier ) { + UWord keyW, valW; + map_barrier_to_Bar_INIT(); + if (VG_(delFromFM)( map_barrier_to_Bar, &keyW, &valW, (UWord)barrier )) { + Bar* bar = (Bar*)valW; + tl_assert(keyW == (UWord)barrier); + delete_Bar(bar); + } +} + + +static void evh__HG_PTHREAD_BARRIER_INIT_PRE ( ThreadId tid, + void* barrier, + UWord count ) +{ + Thread* thr; + Bar* bar; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_BARRIER_INIT_PRE" + "(tid=%d, barrier=%p, count=%lu)\n", + (Int)tid, (void*)barrier, count ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + if (count == 0) { + HG_(record_error_Misc)( + thr, "pthread_barrier_init: 'count' argument is zero" + ); + } + + bar = map_barrier_to_Bar_lookup_or_alloc(barrier); + tl_assert(bar); + + if (bar->initted) { + HG_(record_error_Misc)( + thr, "pthread_barrier_init: barrier is already initialised" + ); + } + + if (bar->waiting && VG_(sizeXA)(bar->waiting) > 0) { + tl_assert(bar->initted); + HG_(record_error_Misc)( + thr, "pthread_barrier_init: threads are waiting at barrier" + ); + VG_(dropTailXA)(bar->waiting, VG_(sizeXA)(bar->waiting)); + } + if (!bar->waiting) { + bar->waiting = VG_(newXA)( HG_(zalloc), "hg.eHPBIP.1", HG_(free), + sizeof(Thread*) ); + } + + tl_assert(bar->waiting); + tl_assert(VG_(sizeXA)(bar->waiting) == 0); + bar->initted = True; + bar->size = count; +} + + +static void evh__HG_PTHREAD_BARRIER_DESTROY_PRE ( ThreadId tid, + void* barrier ) +{ + Thread* thr; + Bar* bar; + + /* Deal with destroy events. The only purpose is to free storage + associated with the barrier, so as to avoid any possible + resource leaks. */ + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_BARRIER_DESTROY_PRE" + "(tid=%d, barrier=%p)\n", + (Int)tid, (void*)barrier ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + bar = map_barrier_to_Bar_lookup_or_alloc(barrier); + tl_assert(bar); + + if (!bar->initted) { + HG_(record_error_Misc)( + thr, "pthread_barrier_destroy: barrier was never initialised" + ); + } + + if (bar->initted && bar->waiting && VG_(sizeXA)(bar->waiting) > 0) { + HG_(record_error_Misc)( + thr, "pthread_barrier_destroy: threads are waiting at barrier" + ); + } + + /* Maybe we shouldn't do this; just let it persist, so that when it + is reinitialised we don't need to do any dynamic memory + allocation? The downside is a potentially unlimited space leak, + if the client creates (in turn) a large number of barriers all + at different locations. Note that if we do later move to the + don't-delete-it scheme, we need to mark the barrier as + uninitialised again since otherwise a later _init call will + elicit a duplicate-init error. */ + map_barrier_to_Bar_delete( barrier ); +} + + +static void evh__HG_PTHREAD_BARRIER_WAIT_PRE ( ThreadId tid, + void* barrier ) +{ + /* This function gets called after a client thread calls + pthread_barrier_wait but before it arrives at the real + pthread_barrier_wait. + + Why is the following correct? It's a bit subtle. + + If this is not the last thread arriving at the barrier, we simply + note its presence and return. Because valgrind (at least as of + Nov 08) is single threaded, we are guaranteed safe from any race + conditions when in this function -- no other client threads are + running. + + If this is the last thread, then we are again the only running + thread. All the other threads will have either arrived at the + real pthread_barrier_wait or are on their way to it, but in any + case are guaranteed not to be able to move past it, because this + thread is currently in this function and so has not yet arrived + at the real pthread_barrier_wait. That means that: + + 1. While we are in this function, none of the other threads + waiting at the barrier can move past it. + + 2. When this function returns (and simulated execution resumes), + this thread and all other waiting threads will be able to move + past the real barrier. + + Because of this, it is now safe to update the vector clocks of + all threads, to represent the fact that they all arrived at the + barrier and have all moved on. There is no danger of any + complications to do with some threads leaving the barrier and + racing back round to the front, whilst others are still leaving + (which is the primary source of complication in correct handling/ + implementation of barriers). That can't happen because we update + here our data structures so as to indicate that the threads have + passed the barrier, even though, as per (2) above, they are + guaranteed not to pass the barrier until we return. + + This relies crucially on Valgrind being single threaded. If that + changes, this will need to be reconsidered. + */ + Thread* thr; + Bar* bar; + SO* so; + UWord present, i; + + if (SHOW_EVENTS >= 1) + VG_(printf)("evh__HG_PTHREAD_BARRIER_WAIT_PRE" + "(tid=%d, barrier=%p)\n", + (Int)tid, (void*)barrier ); + + thr = map_threads_maybe_lookup( tid ); + tl_assert(thr); /* cannot fail - Thread* must already exist */ + + bar = map_barrier_to_Bar_lookup_or_alloc(barrier); + tl_assert(bar); + + if (!bar->initted) { + HG_(record_error_Misc)( + thr, "pthread_barrier_wait: barrier is uninitialised" + ); + return; /* client is broken .. avoid assertions below */ + } + + /* guaranteed by _INIT_PRE above */ + tl_assert(bar->size > 0); + tl_assert(bar->waiting); + + VG_(addToXA)( bar->waiting, &thr ); + + /* guaranteed by this function */ + present = VG_(sizeXA)(bar->waiting); + tl_assert(present > 0 && present <= bar->size); + + if (present < bar->size) + return; + + /* All the threads have arrived. Now do the Interesting Bit. Get + a new synchronisation object and do a weak send to it from all + the participating threads. This makes its vector clocks be the + join of all the individual threads' vector clocks. Then do a + strong receive from it back to all threads, so that their VCs + are a copy of it (hence are all equal to the join of their + original VCs.) */ + so = libhb_so_alloc(); + + /* XXX check ->waiting has no duplicates */ + + tl_assert(bar->waiting); + tl_assert(VG_(sizeXA)(bar->waiting) == bar->size); + + /* compute the join ... */ + for (i = 0; i < bar->size; i++) { + Thread* t = *(Thread**)VG_(indexXA)(bar->waiting, i); + Thr* hbthr = t->hbthr; + libhb_so_send( hbthr, so, False/*weak send*/ ); + } + /* ... and distribute to all threads */ + for (i = 0; i < bar->size; i++) { + Thread* t = *(Thread**)VG_(indexXA)(bar->waiting, i); + Thr* hbthr = t->hbthr; + libhb_so_recv( hbthr, so, True/*strong recv*/ ); + } + + /* finally, we must empty out the waiting vector */ + VG_(dropTailXA)(bar->waiting, VG_(sizeXA)(bar->waiting)); + + /* and we don't need this any more. Perhaps a stack-allocated + SO would be better? */ + libhb_so_dealloc(so); +} + + +/*--------------------------------------------------------------*/ +/*--- Lock acquisition order monitoring ---*/ +/*--------------------------------------------------------------*/ + +/* FIXME: here are some optimisations still to do in + laog__pre_thread_acquires_lock. + + The graph is structured so that if L1 --*--> L2 then L1 must be + acquired before L2. + + The common case is that some thread T holds (eg) L1 L2 and L3 and + is repeatedly acquiring and releasing Ln, and there is no ordering + error in what it is doing. Hence it repeatly: + + (1) searches laog to see if Ln --*--> {L1,L2,L3}, which always + produces the answer No (because there is no error). + + (2) adds edges {L1,L2,L3} --> Ln to laog, which are already present + (because they already got added the first time T acquired Ln). + + Hence cache these two events: + + (1) Cache result of the query from last time. Invalidate the cache + any time any edges are added to or deleted from laog. + + (2) Cache these add-edge requests and ignore them if said edges + have already been added to laog. Invalidate the cache any time + any edges are deleted from laog. +*/ + +typedef + struct { + WordSetID inns; /* in univ_laog */ + WordSetID outs; /* in univ_laog */ + } + LAOGLinks; + +/* lock order acquisition graph */ +static WordFM* laog = NULL; /* WordFM Lock* LAOGLinks* */ + +/* EXPOSITION ONLY: for each edge in 'laog', record the two places + where that edge was created, so that we can show the user later if + we need to. */ +typedef + struct { + Addr src_ga; /* Lock guest addresses for */ + Addr dst_ga; /* src/dst of the edge */ + ExeContext* src_ec; /* And corresponding places where that */ + ExeContext* dst_ec; /* ordering was established */ + } + LAOGLinkExposition; + +static Word cmp_LAOGLinkExposition ( UWord llx1W, UWord llx2W ) { + /* Compare LAOGLinkExposition*s by (src_ga,dst_ga) field pair. */ + LAOGLinkExposition* llx1 = (LAOGLinkExposition*)llx1W; + LAOGLinkExposition* llx2 = (LAOGLinkExposition*)llx2W; + if (llx1->src_ga < llx2->src_ga) return -1; + if (llx1->src_ga > llx2->src_ga) return 1; + if (llx1->dst_ga < llx2->dst_ga) return -1; + if (llx1->dst_ga > llx2->dst_ga) return 1; + return 0; +} + +static WordFM* laog_exposition = NULL; /* WordFM LAOGLinkExposition* NULL */ +/* end EXPOSITION ONLY */ + + +__attribute__((noinline)) +static void laog__init ( void ) +{ + tl_assert(!laog); + tl_assert(!laog_exposition); + + laog = VG_(newFM)( HG_(zalloc), "hg.laog__init.1", + HG_(free), NULL/*unboxedcmp*/ ); + + laog_exposition = VG_(newFM)( HG_(zalloc), "hg.laog__init.2", HG_(free), + cmp_LAOGLinkExposition ); + tl_assert(laog); + tl_assert(laog_exposition); +} + +static void laog__show ( Char* who ) { + Word i, ws_size; + UWord* ws_words; + Lock* me; + LAOGLinks* links; + VG_(printf)("laog (requested by %s) {\n", who); + VG_(initIterFM)( laog ); + me = NULL; + links = NULL; + while (VG_(nextIterFM)( laog, (Word*)&me, + (Word*)&links )) { + tl_assert(me); + tl_assert(links); + VG_(printf)(" node %p:\n", me); + HG_(getPayloadWS)( &ws_words, &ws_size, univ_laog, links->inns ); + for (i = 0; i < ws_size; i++) + VG_(printf)(" inn %#lx\n", ws_words[i] ); + HG_(getPayloadWS)( &ws_words, &ws_size, univ_laog, links->outs ); + for (i = 0; i < ws_size; i++) + VG_(printf)(" out %#lx\n", ws_words[i] ); + me = NULL; + links = NULL; + } + VG_(doneIterFM)( laog ); + VG_(printf)("}\n"); +} + +__attribute__((noinline)) +static void laog__add_edge ( Lock* src, Lock* dst ) { + Word keyW; + LAOGLinks* links; + Bool presentF, presentR; + if (0) VG_(printf)("laog__add_edge %p %p\n", src, dst); + + /* Take the opportunity to sanity check the graph. Record in + presentF if there is already a src->dst mapping in this node's + forwards links, and presentR if there is already a src->dst + mapping in this node's backwards links. They should agree! + Also, we need to know whether the edge was already present so as + to decide whether or not to update the link details mapping. We + can compute presentF and presentR essentially for free, so may + as well do this always. */ + presentF = presentR = False; + + /* Update the out edges for src */ + keyW = 0; + links = NULL; + if (VG_(lookupFM)( laog, &keyW, (Word*)&links, (Word)src )) { + WordSetID outs_new; + tl_assert(links); + tl_assert(keyW == (Word)src); + outs_new = HG_(addToWS)( univ_laog, links->outs, (Word)dst ); + presentF = outs_new == links->outs; + links->outs = outs_new; + } else { + links = HG_(zalloc)("hg.lae.1", sizeof(LAOGLinks)); + links->inns = HG_(emptyWS)( univ_laog ); + links->outs = HG_(singletonWS)( univ_laog, (Word)dst ); + VG_(addToFM)( laog, (Word)src, (Word)links ); + } + /* Update the in edges for dst */ + keyW = 0; + links = NULL; + if (VG_(lookupFM)( laog, &keyW, (Word*)&links, (Word)dst )) { + WordSetID inns_new; + tl_assert(links); + tl_assert(keyW == (Word)dst); + inns_new = HG_(addToWS)( univ_laog, links->inns, (Word)src ); + presentR = inns_new == links->inns; + links->inns = inns_new; + } else { + links = HG_(zalloc)("hg.lae.2", sizeof(LAOGLinks)); + links->inns = HG_(singletonWS)( univ_laog, (Word)src ); + links->outs = HG_(emptyWS)( univ_laog ); + VG_(addToFM)( laog, (Word)dst, (Word)links ); + } + + tl_assert( (presentF && presentR) || (!presentF && !presentR) ); + + if (!presentF && src->acquired_at && dst->acquired_at) { + LAOGLinkExposition expo; + /* If this edge is entering the graph, and we have acquired_at + information for both src and dst, record those acquisition + points. Hence, if there is later a violation of this + ordering, we can show the user the two places in which the + required src-dst ordering was previously established. */ + if (0) VG_(printf)("acquire edge %#lx %#lx\n", + src->guestaddr, dst->guestaddr); + expo.src_ga = src->guestaddr; + expo.dst_ga = dst->guestaddr; + expo.src_ec = NULL; + expo.dst_ec = NULL; + tl_assert(laog_exposition); + if (VG_(lookupFM)( laog_exposition, NULL, NULL, (Word)&expo )) { + /* we already have it; do nothing */ + } else { + LAOGLinkExposition* expo2 = HG_(zalloc)("hg.lae.3", + sizeof(LAOGLinkExposition)); + expo2->src_ga = src->guestaddr; + expo2->dst_ga = dst->guestaddr; + expo2->src_ec = src->acquired_at; + expo2->dst_ec = dst->acquired_at; + VG_(addToFM)( laog_exposition, (Word)expo2, (Word)NULL ); + } + } +} + +__attribute__((noinline)) +static void laog__del_edge ( Lock* src, Lock* dst ) { + Word keyW; + LAOGLinks* links; + if (0) VG_(printf)("laog__del_edge %p %p\n", src, dst); + /* Update the out edges for src */ + keyW = 0; + links = NULL; + if (VG_(lookupFM)( laog, &keyW, (Word*)&links, (Word)src )) { + tl_assert(links); + tl_assert(keyW == (Word)src); + links->outs = HG_(delFromWS)( univ_laog, links->outs, (Word)dst ); + } + /* Update the in edges for dst */ + keyW = 0; + links = NULL; + if (VG_(lookupFM)( laog, &keyW, (Word*)&links, (Word)dst )) { + tl_assert(links); + tl_assert(keyW == (Word)dst); + links->inns = HG_(delFromWS)( univ_laog, links->inns, (Word)src ); + } +} + +__attribute__((noinline)) +static WordSetID /* in univ_laog */ laog__succs ( Lock* lk ) { + Word keyW; + LAOGLinks* links; + keyW = 0; + links = NULL; + if (VG_(lookupFM)( laog, &keyW, (Word*)&links, (Word)lk )) { + tl_assert(links); + tl_assert(keyW == (Word)lk); + return links->outs; + } else { + return HG_(emptyWS)( univ_laog ); + } +} + +__attribute__((noinline)) +static WordSetID /* in univ_laog */ laog__preds ( Lock* lk ) { + Word keyW; + LAOGLinks* links; + keyW = 0; + links = NULL; + if (VG_(lookupFM)( laog, &keyW, (Word*)&links, (Word)lk )) { + tl_assert(links); + tl_assert(keyW == (Word)lk); + return links->inns; + } else { + return HG_(emptyWS)( univ_laog ); + } +} + +__attribute__((noinline)) +static void laog__sanity_check ( Char* who ) { + Word i, ws_size; + UWord* ws_words; + Lock* me; + LAOGLinks* links; + if (UNLIKELY(!laog || !laog_exposition)) + laog__init(); + VG_(initIterFM)( laog ); + me = NULL; + links = NULL; + if (0) VG_(printf)("laog sanity check\n"); + while (VG_(nextIterFM)( laog, (Word*)&me, + (Word*)&links )) { + tl_assert(me); + tl_assert(links); + HG_(getPayloadWS)( &ws_words, &ws_size, univ_laog, links->inns ); + for (i = 0; i < ws_size; i++) { + if ( ! HG_(elemWS)( univ_laog, + laog__succs( (Lock*)ws_words[i] ), + (Word)me )) + goto bad; + } + HG_(getPayloadWS)( &ws_words, &ws_size, univ_laog, links->outs ); + for (i = 0; i < ws_size; i++) { + if ( ! HG_(elemWS)( univ_laog, + laog__preds( (Lock*)ws_words[i] ), + (Word)me )) + goto bad; + } + me = NULL; + links = NULL; + } + VG_(doneIterFM)( laog ); + return; + + bad: + VG_(printf)("laog__sanity_check(%s) FAILED\n", who); + laog__show(who); + tl_assert(0); +} + +/* If there is a path in laog from 'src' to any of the elements in + 'dst', return an arbitrarily chosen element of 'dst' reachable from + 'src'. If no path exist from 'src' to any element in 'dst', return + NULL. */ +__attribute__((noinline)) +static +Lock* laog__do_dfs_from_to ( Lock* src, WordSetID dsts /* univ_lsets */ ) +{ + Lock* ret; + Word i, ssz; + XArray* stack; /* of Lock* */ + WordFM* visited; /* Lock* -> void, iow, Set(Lock*) */ + Lock* here; + WordSetID succs; + Word succs_size; + UWord* succs_words; + //laog__sanity_check(); + + /* If the destination set is empty, we can never get there from + 'src' :-), so don't bother to try */ + if (HG_(isEmptyWS)( univ_lsets, dsts )) + return NULL; + + ret = NULL; + stack = VG_(newXA)( HG_(zalloc), "hg.lddft.1", HG_(free), sizeof(Lock*) ); + visited = VG_(newFM)( HG_(zalloc), "hg.lddft.2", HG_(free), NULL/*unboxedcmp*/ ); + + (void) VG_(addToXA)( stack, &src ); + + while (True) { + + ssz = VG_(sizeXA)( stack ); + + if (ssz == 0) { ret = NULL; break; } + + here = *(Lock**) VG_(indexXA)( stack, ssz-1 ); + VG_(dropTailXA)( stack, 1 ); + + if (HG_(elemWS)( univ_lsets, dsts, (Word)here )) { ret = here; break; } + + if (VG_(lookupFM)( visited, NULL, NULL, (Word)here )) + continue; + + VG_(addToFM)( visited, (Word)here, 0 ); + + succs = laog__succs( here ); + HG_(getPayloadWS)( &succs_words, &succs_size, univ_laog, succs ); + for (i = 0; i < succs_size; i++) + (void) VG_(addToXA)( stack, &succs_words[i] ); + } + + VG_(deleteFM)( visited, NULL, NULL ); + VG_(deleteXA)( stack ); + return ret; +} + + +/* Thread 'thr' is acquiring 'lk'. Check for inconsistent ordering + between 'lk' and the locks already held by 'thr' and issue a + complaint if so. Also, update the ordering graph appropriately. +*/ +__attribute__((noinline)) +static void laog__pre_thread_acquires_lock ( + Thread* thr, /* NB: BEFORE lock is added */ + Lock* lk + ) +{ + UWord* ls_words; + Word ls_size, i; + Lock* other; + + /* It may be that 'thr' already holds 'lk' and is recursively + relocking in. In this case we just ignore the call. */ + /* NB: univ_lsets really is correct here */ + if (HG_(elemWS)( univ_lsets, thr->locksetA, (Word)lk )) + return; + + if (UNLIKELY(!laog || !laog_exposition)) + laog__init(); + + /* First, the check. Complain if there is any path in laog from lk + to any of the locks already held by thr, since if any such path + existed, it would mean that previously lk was acquired before + (rather than after, as we are doing here) at least one of those + locks. + */ + other = laog__do_dfs_from_to(lk, thr->locksetA); + if (other) { + LAOGLinkExposition key, *found; + /* So we managed to find a path lk --*--> other in the graph, + which implies that 'lk' should have been acquired before + 'other' but is in fact being acquired afterwards. We present + the lk/other arguments to record_error_LockOrder in the order + in which they should have been acquired. */ + /* Go look in the laog_exposition mapping, to find the allocation + points for this edge, so we can show the user. */ + key.src_ga = lk->guestaddr; + key.dst_ga = other->guestaddr; + key.src_ec = NULL; + key.dst_ec = NULL; + found = NULL; + if (VG_(lookupFM)( laog_exposition, + (Word*)&found, NULL, (Word)&key )) { + tl_assert(found != &key); + tl_assert(found->src_ga == key.src_ga); + tl_assert(found->dst_ga == key.dst_ga); + tl_assert(found->src_ec); + tl_assert(found->dst_ec); + HG_(record_error_LockOrder)( + thr, lk->guestaddr, other->guestaddr, + found->src_ec, found->dst_ec ); + } else { + /* Hmm. This can't happen (can it?) */ + HG_(record_error_LockOrder)( + thr, lk->guestaddr, other->guestaddr, + NULL, NULL ); + } + } + + /* Second, add to laog the pairs + (old, lk) | old <- locks already held by thr + Since both old and lk are currently held by thr, their acquired_at + fields must be non-NULL. + */ + tl_assert(lk->acquired_at); + HG_(getPayloadWS)( &ls_words, &ls_size, univ_lsets, thr->locksetA ); + for (i = 0; i < ls_size; i++) { + Lock* old = (Lock*)ls_words[i]; + tl_assert(old->acquired_at); + laog__add_edge( old, lk ); + } + + /* Why "except_Locks" ? We're here because a lock is being + acquired by a thread, and we're in an inconsistent state here. + See the call points in evhH__post_thread_{r,w}_acquires_lock. + When called in this inconsistent state, locks__sanity_check duly + barfs. */ + if (HG_(clo_sanity_flags) & SCE_LAOG) + all_except_Locks__sanity_check("laog__pre_thread_acquires_lock-post"); +} + + +/* Delete from 'laog' any pair mentioning a lock in locksToDelete */ + +__attribute__((noinline)) +static void laog__handle_one_lock_deletion ( Lock* lk ) +{ + WordSetID preds, succs; + Word preds_size, succs_size, i, j; + UWord *preds_words, *succs_words; + + if (UNLIKELY(!laog || !laog_exposition)) + laog__init(); + + preds = laog__preds( lk ); + succs = laog__succs( lk ); + + HG_(getPayloadWS)( &preds_words, &preds_size, univ_laog, preds ); + for (i = 0; i < preds_size; i++) + laog__del_edge( (Lock*)preds_words[i], lk ); + + HG_(getPayloadWS)( &succs_words, &succs_size, univ_laog, succs ); + for (j = 0; j < succs_size; j++) + laog__del_edge( lk, (Lock*)succs_words[j] ); + + for (i = 0; i < preds_size; i++) { + for (j = 0; j < succs_size; j++) { + if (preds_words[i] != succs_words[j]) { + /* This can pass unlocked locks to laog__add_edge, since + we're deleting stuff. So their acquired_at fields may + be NULL. */ + laog__add_edge( (Lock*)preds_words[i], (Lock*)succs_words[j] ); + } + } + } +} + +//__attribute__((noinline)) +//static void laog__handle_lock_deletions ( +// WordSetID /* in univ_laog */ locksToDelete +// ) +//{ +// Word i, ws_size; +// UWord* ws_words; +// +// if (UNLIKELY(!laog || !laog_exposition)) +// laog__init(); +// +// HG_(getPayloadWS)( &ws_words, &ws_size, univ_lsets, locksToDelete ); +// for (i = 0; i < ws_size; i++) +// laog__handle_one_lock_deletion( (Lock*)ws_words[i] ); +// +// if (HG_(clo_sanity_flags) & SCE_LAOG) +// all__sanity_check("laog__handle_lock_deletions-post"); +//} + + +/*--------------------------------------------------------------*/ +/*--- Malloc/free replacements ---*/ +/*--------------------------------------------------------------*/ + +typedef + struct { + void* next; /* required by m_hashtable */ + Addr payload; /* ptr to actual block */ + SizeT szB; /* size requested */ + ExeContext* where; /* where it was allocated */ + Thread* thr; /* allocating thread */ + } + MallocMeta; + +/* A hash table of MallocMetas, used to track malloc'd blocks + (obviously). */ +static VgHashTable hg_mallocmeta_table = NULL; + + +static MallocMeta* new_MallocMeta ( void ) { + MallocMeta* md = HG_(zalloc)( "hg.new_MallocMeta.1", sizeof(MallocMeta) ); + tl_assert(md); + return md; +} +static void delete_MallocMeta ( MallocMeta* md ) { + HG_(free)(md); +} + + +/* Allocate a client block and set up the metadata for it. */ + +static +void* handle_alloc ( ThreadId tid, + SizeT szB, SizeT alignB, Bool is_zeroed ) +{ + Addr p; + MallocMeta* md; + + tl_assert( ((SSizeT)szB) >= 0 ); + p = (Addr)VG_(cli_malloc)(alignB, szB); + if (!p) { + return NULL; + } + if (is_zeroed) + VG_(memset)((void*)p, 0, szB); + + /* Note that map_threads_lookup must succeed (cannot assert), since + memory can only be allocated by currently alive threads, hence + they must have an entry in map_threads. */ + md = new_MallocMeta(); + md->payload = p; + md->szB = szB; + md->where = VG_(record_ExeContext)( tid, 0 ); + md->thr = map_threads_lookup( tid ); + + VG_(HT_add_node)( hg_mallocmeta_table, (VgHashNode*)md ); + + /* Tell the lower level memory wranglers. */ + evh__new_mem_heap( p, szB, is_zeroed ); + + return (void*)p; +} + +/* Re the checks for less-than-zero (also in hg_cli__realloc below): + Cast to a signed type to catch any unexpectedly negative args. + We're assuming here that the size asked for is not greater than + 2^31 bytes (for 32-bit platforms) or 2^63 bytes (for 64-bit + platforms). */ +static void* hg_cli__malloc ( ThreadId tid, SizeT n ) { + if (((SSizeT)n) < 0) return NULL; + return handle_alloc ( tid, n, VG_(clo_alignment), + /*is_zeroed*/False ); +} +static void* hg_cli____builtin_new ( ThreadId tid, SizeT n ) { + if (((SSizeT)n) < 0) return NULL; + return handle_alloc ( tid, n, VG_(clo_alignment), + /*is_zeroed*/False ); +} +static void* hg_cli____builtin_vec_new ( ThreadId tid, SizeT n ) { + if (((SSizeT)n) < 0) return NULL; + return handle_alloc ( tid, n, VG_(clo_alignment), + /*is_zeroed*/False ); +} +static void* hg_cli__memalign ( ThreadId tid, SizeT align, SizeT n ) { + if (((SSizeT)n) < 0) return NULL; + return handle_alloc ( tid, n, align, + /*is_zeroed*/False ); +} +static void* hg_cli__calloc ( ThreadId tid, SizeT nmemb, SizeT size1 ) { + if ( ((SSizeT)nmemb) < 0 || ((SSizeT)size1) < 0 ) return NULL; + return handle_alloc ( tid, nmemb*size1, VG_(clo_alignment), + /*is_zeroed*/True ); +} + + +/* Free a client block, including getting rid of the relevant + metadata. */ + +static void handle_free ( ThreadId tid, void* p ) +{ + MallocMeta *md, *old_md; + SizeT szB; + + /* First see if we can find the metadata for 'p'. */ + md = (MallocMeta*) VG_(HT_lookup)( hg_mallocmeta_table, (UWord)p ); + if (!md) + return; /* apparently freeing a bogus address. Oh well. */ + + tl_assert(md->payload == (Addr)p); + szB = md->szB; + + /* Nuke the metadata block */ + old_md = (MallocMeta*) + VG_(HT_remove)( hg_mallocmeta_table, (UWord)p ); + tl_assert(old_md); /* it must be present - we just found it */ + tl_assert(old_md == md); + tl_assert(old_md->payload == (Addr)p); + + VG_(cli_free)((void*)old_md->payload); + delete_MallocMeta(old_md); + + /* Tell the lower level memory wranglers. */ + evh__die_mem_heap( (Addr)p, szB ); +} + +static void hg_cli__free ( ThreadId tid, void* p ) { + handle_free(tid, p); +} +static void hg_cli____builtin_delete ( ThreadId tid, void* p ) { + handle_free(tid, p); +} +static void hg_cli____builtin_vec_delete ( ThreadId tid, void* p ) { + handle_free(tid, p); +} + + +static void* hg_cli__realloc ( ThreadId tid, void* payloadV, SizeT new_size ) +{ + MallocMeta *md, *md_new, *md_tmp; + SizeT i; + + Addr payload = (Addr)payloadV; + + if (((SSizeT)new_size) < 0) return NULL; + + md = (MallocMeta*) VG_(HT_lookup)( hg_mallocmeta_table, (UWord)payload ); + if (!md) + return NULL; /* apparently realloc-ing a bogus address. Oh well. */ + + tl_assert(md->payload == payload); + + if (md->szB == new_size) { + /* size unchanged */ + md->where = VG_(record_ExeContext)(tid, 0); + return payloadV; + } + + if (md->szB > new_size) { + /* new size is smaller */ + md->szB = new_size; + md->where = VG_(record_ExeContext)(tid, 0); + evh__die_mem_heap( md->payload + new_size, md->szB - new_size ); + return payloadV; + } + + /* else */ { + /* new size is bigger */ + Addr p_new = (Addr)VG_(cli_malloc)(VG_(clo_alignment), new_size); + + /* First half kept and copied, second half new */ + // FIXME: shouldn't we use a copier which implements the + // memory state machine? + shadow_mem_copy_range( payload, p_new, md->szB ); + evh__new_mem_heap ( p_new + md->szB, new_size - md->szB, + /*inited*/False ); + /* FIXME: can anything funny happen here? specifically, if the + old range contained a lock, then die_mem_heap will complain. + Is that the correct behaviour? Not sure. */ + evh__die_mem_heap( payload, md->szB ); + + /* Copy from old to new */ + for (i = 0; i < md->szB; i++) + ((UChar*)p_new)[i] = ((UChar*)payload)[i]; + + /* Because the metadata hash table is index by payload address, + we have to get rid of the old hash table entry and make a new + one. We can't just modify the existing metadata in place, + because then it would (almost certainly) be in the wrong hash + chain. */ + md_new = new_MallocMeta(); + *md_new = *md; + + md_tmp = VG_(HT_remove)( hg_mallocmeta_table, payload ); + tl_assert(md_tmp); + tl_assert(md_tmp == md); + + VG_(cli_free)((void*)md->payload); + delete_MallocMeta(md); + + /* Update fields */ + md_new->where = VG_(record_ExeContext)( tid, 0 ); + md_new->szB = new_size; + md_new->payload = p_new; + md_new->thr = map_threads_lookup( tid ); + + /* and add */ + VG_(HT_add_node)( hg_mallocmeta_table, (VgHashNode*)md_new ); + + return (void*)p_new; + } +} + +static SizeT hg_cli_malloc_usable_size ( ThreadId tid, void* p ) +{ + MallocMeta *md = VG_(HT_lookup)( hg_mallocmeta_table, (UWord)p ); + + // There may be slop, but pretend there isn't because only the asked-for + // area will have been shadowed properly. + return ( md ? md->szB : 0 ); +} + + +/*--------------------------------------------------------------*/ +/*--- Instrumentation ---*/ +/*--------------------------------------------------------------*/ + +static void instrument_mem_access ( IRSB* bbOut, + IRExpr* addr, + Int szB, + Bool isStore, + Int hWordTy_szB ) +{ + IRType tyAddr = Ity_INVALID; + HChar* hName = NULL; + void* hAddr = NULL; + Int regparms = 0; + IRExpr** argv = NULL; + IRDirty* di = NULL; + + tl_assert(isIRAtom(addr)); + tl_assert(hWordTy_szB == 4 || hWordTy_szB == 8); + + tyAddr = typeOfIRExpr( bbOut->tyenv, addr ); + tl_assert(tyAddr == Ity_I32 || tyAddr == Ity_I64); + + /* So the effective address is in 'addr' now. */ + regparms = 1; // unless stated otherwise + if (isStore) { + switch (szB) { + case 1: + hName = "evh__mem_help_write_1"; + hAddr = &evh__mem_help_write_1; + argv = mkIRExprVec_1( addr ); + break; + case 2: + hName = "evh__mem_help_write_2"; + hAddr = &evh__mem_help_write_2; + argv = mkIRExprVec_1( addr ); + break; + case 4: + hName = "evh__mem_help_write_4"; + hAddr = &evh__mem_help_write_4; + argv = mkIRExprVec_1( addr ); + break; + case 8: + hName = "evh__mem_help_write_8"; + hAddr = &evh__mem_help_write_8; + argv = mkIRExprVec_1( addr ); + break; + default: + tl_assert(szB > 8 && szB <= 512); /* stay sane */ + regparms = 2; + hName = "evh__mem_help_write_N"; + hAddr = &evh__mem_help_write_N; + argv = mkIRExprVec_2( addr, mkIRExpr_HWord( szB )); + break; + } + } else { + switch (szB) { + case 1: + hName = "evh__mem_help_read_1"; + hAddr = &evh__mem_help_read_1; + argv = mkIRExprVec_1( addr ); + break; + case 2: + hName = "evh__mem_help_read_2"; + hAddr = &evh__mem_help_read_2; + argv = mkIRExprVec_1( addr ); + break; + case 4: + hName = "evh__mem_help_read_4"; + hAddr = &evh__mem_help_read_4; + argv = mkIRExprVec_1( addr ); + break; + case 8: + hName = "evh__mem_help_read_8"; + hAddr = &evh__mem_help_read_8; + argv = mkIRExprVec_1( addr ); + break; + default: + tl_assert(szB > 8 && szB <= 512); /* stay sane */ + regparms = 2; + hName = "evh__mem_help_read_N"; + hAddr = &evh__mem_help_read_N; + argv = mkIRExprVec_2( addr, mkIRExpr_HWord( szB )); + break; + } + } + + /* Add the helper. */ + tl_assert(hName); + tl_assert(hAddr); + tl_assert(argv); + di = unsafeIRDirty_0_N( regparms, + hName, VG_(fnptr_to_fnentry)( hAddr ), + argv ); + addStmtToIRSB( bbOut, IRStmt_Dirty(di) ); +} + + +//static void instrument_memory_bus_event ( IRSB* bbOut, IRMBusEvent event ) +//{ +// switch (event) { +// case Imbe_SnoopedStoreBegin: +// case Imbe_SnoopedStoreEnd: +// /* These arise from ppc stwcx. insns. They should perhaps be +// handled better. */ +// break; +// case Imbe_Fence: +// break; /* not interesting */ +// case Imbe_BusLock: +// case Imbe_BusUnlock: +// addStmtToIRSB( +// bbOut, +// IRStmt_Dirty( +// unsafeIRDirty_0_N( +// 0/*regparms*/, +// event == Imbe_BusLock ? "evh__bus_lock" +// : "evh__bus_unlock", +// VG_(fnptr_to_fnentry)( +// event == Imbe_BusLock ? &evh__bus_lock +// : &evh__bus_unlock +// ), +// mkIRExprVec_0() +// ) +// ) +// ); +// break; +// default: +// tl_assert(0); +// } +//} + + +static +IRSB* hg_instrument ( VgCallbackClosure* closure, + IRSB* bbIn, + VexGuestLayout* layout, + VexGuestExtents* vge, + IRType gWordTy, IRType hWordTy ) +{ + Int i; + IRSB* bbOut; + Bool x86busLocked = False; + Bool isSnoopedStore = False; + + if (gWordTy != hWordTy) { + /* We don't currently support this case. */ + VG_(tool_panic)("host/guest word size mismatch"); + } + + /* Set up BB */ + bbOut = emptyIRSB(); + bbOut->tyenv = deepCopyIRTypeEnv(bbIn->tyenv); + bbOut->next = deepCopyIRExpr(bbIn->next); + bbOut->jumpkind = bbIn->jumpkind; + + // Copy verbatim any IR preamble preceding the first IMark + i = 0; + while (i < bbIn->stmts_used && bbIn->stmts[i]->tag != Ist_IMark) { + addStmtToIRSB( bbOut, bbIn->stmts[i] ); + i++; + } + + for (/*use current i*/; i < bbIn->stmts_used; i++) { + IRStmt* st = bbIn->stmts[i]; + tl_assert(st); + tl_assert(isFlatIRStmt(st)); + switch (st->tag) { + case Ist_NoOp: + case Ist_AbiHint: + case Ist_Put: + case Ist_PutI: + case Ist_IMark: + case Ist_Exit: + /* None of these can contain any memory references. */ + break; + + case Ist_MBE: + //instrument_memory_bus_event( bbOut, st->Ist.MBE.event ); + switch (st->Ist.MBE.event) { + case Imbe_Fence: + break; /* not interesting */ + /* Imbe_Bus{Lock,Unlock} arise from x86/amd64 LOCK + prefixed instructions. */ + case Imbe_BusLock: + tl_assert(x86busLocked == False); + x86busLocked = True; + break; + case Imbe_BusUnlock: + tl_assert(x86busLocked == True); + x86busLocked = False; + break; + /* Imbe_SnoopedStore{Begin,End} arise from ppc + stwcx. instructions. */ + case Imbe_SnoopedStoreBegin: + tl_assert(isSnoopedStore == False); + isSnoopedStore = True; + break; + case Imbe_SnoopedStoreEnd: + tl_assert(isSnoopedStore == True); + isSnoopedStore = False; + break; + default: + goto unhandled; + } + break; + + case Ist_Store: + if (!x86busLocked && !isSnoopedStore) + instrument_mem_access( + bbOut, + st->Ist.Store.addr, + sizeofIRType(typeOfIRExpr(bbIn->tyenv, st->Ist.Store.data)), + True/*isStore*/, + sizeofIRType(hWordTy) + ); + break; + + case Ist_WrTmp: { + IRExpr* data = st->Ist.WrTmp.data; + if (data->tag == Iex_Load) { + instrument_mem_access( + bbOut, + data->Iex.Load.addr, + sizeofIRType(data->Iex.Load.ty), + False/*!isStore*/, + sizeofIRType(hWordTy) + ); + } + break; + } + + case Ist_Dirty: { + Int dataSize; + IRDirty* d = st->Ist.Dirty.details; + if (d->mFx != Ifx_None) { + /* This dirty helper accesses memory. Collect the + details. */ + tl_assert(d->mAddr != NULL); + tl_assert(d->mSize != 0); + dataSize = d->mSize; + if (d->mFx == Ifx_Read || d->mFx == Ifx_Modify) { + instrument_mem_access( + bbOut, d->mAddr, dataSize, False/*!isStore*/, + sizeofIRType(hWordTy) + ); + } + /* This isn't really correct. Really the + instrumentation should be only added when + (!x86busLocked && !isSnoopedStore), just like with + Ist_Store. Still, I don't think this is + particularly important. */ + if (d->mFx == Ifx_Write || d->mFx == Ifx_Modify) { + instrument_mem_access( + bbOut, d->mAddr, dataSize, True/*isStore*/, + sizeofIRType(hWordTy) + ); + } + } else { + tl_assert(d->mAddr == NULL); + tl_assert(d->mSize == 0); + } + break; + } + + default: + unhandled: + ppIRStmt(st); + tl_assert(0); + + } /* switch (st->tag) */ + + addStmtToIRSB( bbOut, st ); + } /* iterate over bbIn->stmts */ + + return bbOut; +} + + +/*----------------------------------------------------------------*/ +/*--- Client requests ---*/ +/*----------------------------------------------------------------*/ + +/* Sheesh. Yet another goddam finite map. */ +static WordFM* map_pthread_t_to_Thread = NULL; /* pthread_t -> Thread* */ + +static void map_pthread_t_to_Thread_INIT ( void ) { + if (UNLIKELY(map_pthread_t_to_Thread == NULL)) { + map_pthread_t_to_Thread = VG_(newFM)( HG_(zalloc), "hg.mpttT.1", + HG_(free), NULL ); + tl_assert(map_pthread_t_to_Thread != NULL); + } +} + + +static +Bool hg_handle_client_request ( ThreadId tid, UWord* args, UWord* ret) +{ + if (!VG_IS_TOOL_USERREQ('H','G',args[0])) + return False; + + /* Anything that gets past the above check is one of ours, so we + should be able to handle it. */ + + /* default, meaningless return value, unless otherwise set */ + *ret = 0; + + switch (args[0]) { + + /* --- --- User-visible client requests --- --- */ + + case VG_USERREQ__HG_CLEAN_MEMORY: + if (0) VG_(printf)("VG_USERREQ__HG_CLEAN_MEMORY(%#lx,%ld)\n", + args[1], args[2]); + /* Call die_mem to (expensively) tidy up properly, if there + are any held locks etc in the area. Calling evh__die_mem + and then evh__new_mem is a bit inefficient; probably just + the latter would do. */ + if (args[2] > 0) { /* length */ + evh__die_mem(args[1], args[2]); + /* and then set it to New */ + evh__new_mem(args[1], args[2]); + } + break; + + /* --- --- Client requests for Helgrind's use only --- --- */ + + /* Some thread is telling us its pthread_t value. Record the + binding between that and the associated Thread*, so we can + later find the Thread* again when notified of a join by the + thread. */ + case _VG_USERREQ__HG_SET_MY_PTHREAD_T: { + Thread* my_thr = NULL; + if (0) + VG_(printf)("SET_MY_PTHREAD_T (tid %d): pthread_t = %p\n", (Int)tid, + (void*)args[1]); + map_pthread_t_to_Thread_INIT(); + my_thr = map_threads_maybe_lookup( tid ); + /* This assertion should hold because the map_threads (tid to + Thread*) binding should have been made at the point of + low-level creation of this thread, which should have + happened prior to us getting this client request for it. + That's because this client request is sent from + client-world from the 'thread_wrapper' function, which + only runs once the thread has been low-level created. */ + tl_assert(my_thr != NULL); + /* So now we know that (pthread_t)args[1] is associated with + (Thread*)my_thr. Note that down. */ + if (0) + VG_(printf)("XXXX: bind pthread_t %p to Thread* %p\n", + (void*)args[1], (void*)my_thr ); + VG_(addToFM)( map_pthread_t_to_Thread, (Word)args[1], (Word)my_thr ); + break; + } + + case _VG_USERREQ__HG_PTH_API_ERROR: { + Thread* my_thr = NULL; + map_pthread_t_to_Thread_INIT(); + my_thr = map_threads_maybe_lookup( tid ); + tl_assert(my_thr); /* See justification above in SET_MY_PTHREAD_T */ + HG_(record_error_PthAPIerror)( + my_thr, (HChar*)args[1], (Word)args[2], (HChar*)args[3] ); + break; + } + + /* This thread (tid) has completed a join with the quitting + thread whose pthread_t is in args[1]. */ + case _VG_USERREQ__HG_PTHREAD_JOIN_POST: { + Thread* thr_q = NULL; /* quitter Thread* */ + Bool found = False; + if (0) + VG_(printf)("NOTIFY_JOIN_COMPLETE (tid %d): quitter = %p\n", (Int)tid, + (void*)args[1]); + map_pthread_t_to_Thread_INIT(); + found = VG_(lookupFM)( map_pthread_t_to_Thread, + NULL, (Word*)&thr_q, (Word)args[1] ); + /* Can this fail? It would mean that our pthread_join + wrapper observed a successful join on args[1] yet that + thread never existed (or at least, it never lodged an + entry in the mapping (via SET_MY_PTHREAD_T)). Which + sounds like a bug in the threads library. */ + // FIXME: get rid of this assertion; handle properly + tl_assert(found); + if (found) { + if (0) + VG_(printf)(".................... quitter Thread* = %p\n", + thr_q); + evh__HG_PTHREAD_JOIN_POST( tid, thr_q ); + } + break; + } + + /* EXPOSITION only: by intercepting lock init events we can show + the user where the lock was initialised, rather than only + being able to show where it was first locked. Intercepting + lock initialisations is not necessary for the basic operation + of the race checker. */ + case _VG_USERREQ__HG_PTHREAD_MUTEX_INIT_POST: + evh__HG_PTHREAD_MUTEX_INIT_POST( tid, (void*)args[1], args[2] ); + break; + + case _VG_USERREQ__HG_PTHREAD_MUTEX_DESTROY_PRE: + evh__HG_PTHREAD_MUTEX_DESTROY_PRE( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_PRE: // pth_mx_t* + evh__HG_PTHREAD_MUTEX_UNLOCK_PRE( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_POST: // pth_mx_t* + evh__HG_PTHREAD_MUTEX_UNLOCK_POST( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE: // pth_mx_t*, Word + evh__HG_PTHREAD_MUTEX_LOCK_PRE( tid, (void*)args[1], args[2] ); + break; + + case _VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST: // pth_mx_t* + evh__HG_PTHREAD_MUTEX_LOCK_POST( tid, (void*)args[1] ); + break; + + /* This thread is about to do pthread_cond_signal on the + pthread_cond_t* in arg[1]. Ditto pthread_cond_broadcast. */ + case _VG_USERREQ__HG_PTHREAD_COND_SIGNAL_PRE: + case _VG_USERREQ__HG_PTHREAD_COND_BROADCAST_PRE: + evh__HG_PTHREAD_COND_SIGNAL_PRE( tid, (void*)args[1] ); + break; + + /* Entry into pthread_cond_wait, cond=arg[1], mutex=arg[2]. + Returns a flag indicating whether or not the mutex is believed to be + valid for this operation. */ + case _VG_USERREQ__HG_PTHREAD_COND_WAIT_PRE: { + Bool mutex_is_valid + = evh__HG_PTHREAD_COND_WAIT_PRE( tid, (void*)args[1], + (void*)args[2] ); + *ret = mutex_is_valid ? 1 : 0; + break; + } + + /* cond=arg[1] */ + case _VG_USERREQ__HG_PTHREAD_COND_DESTROY_PRE: + evh__HG_PTHREAD_COND_DESTROY_PRE( tid, (void*)args[1] ); + break; + + /* Thread successfully completed pthread_cond_wait, cond=arg[1], + mutex=arg[2] */ + case _VG_USERREQ__HG_PTHREAD_COND_WAIT_POST: + evh__HG_PTHREAD_COND_WAIT_POST( tid, + (void*)args[1], (void*)args[2] ); + break; + + case _VG_USERREQ__HG_PTHREAD_RWLOCK_INIT_POST: + evh__HG_PTHREAD_RWLOCK_INIT_POST( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_PTHREAD_RWLOCK_DESTROY_PRE: + evh__HG_PTHREAD_RWLOCK_DESTROY_PRE( tid, (void*)args[1] ); + break; + + /* rwlock=arg[1], isW=arg[2], isTryLock=arg[3] */ + case _VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_PRE: + evh__HG_PTHREAD_RWLOCK_LOCK_PRE( tid, (void*)args[1], + args[2], args[3] ); + break; + + /* rwlock=arg[1], isW=arg[2] */ + case _VG_USERREQ__HG_PTHREAD_RWLOCK_LOCK_POST: + evh__HG_PTHREAD_RWLOCK_LOCK_POST( tid, (void*)args[1], args[2] ); + break; + + case _VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_PRE: + evh__HG_PTHREAD_RWLOCK_UNLOCK_PRE( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_PTHREAD_RWLOCK_UNLOCK_POST: + evh__HG_PTHREAD_RWLOCK_UNLOCK_POST( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_POSIX_SEM_INIT_POST: /* sem_t*, unsigned long */ + evh__HG_POSIX_SEM_INIT_POST( tid, (void*)args[1], args[2] ); + break; + + case _VG_USERREQ__HG_POSIX_SEM_DESTROY_PRE: /* sem_t* */ + evh__HG_POSIX_SEM_DESTROY_PRE( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_POSIX_SEM_POST_PRE: /* sem_t* */ + evh__HG_POSIX_SEM_POST_PRE( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_POSIX_SEM_WAIT_POST: /* sem_t* */ + evh__HG_POSIX_SEM_WAIT_POST( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_PTHREAD_BARRIER_INIT_PRE: + /* pth_bar_t*, ulong */ + evh__HG_PTHREAD_BARRIER_INIT_PRE( tid, (void*)args[1], args[2] ); + break; + + case _VG_USERREQ__HG_PTHREAD_BARRIER_WAIT_PRE: + /* pth_bar_t* */ + evh__HG_PTHREAD_BARRIER_WAIT_PRE( tid, (void*)args[1] ); + break; + + case _VG_USERREQ__HG_PTHREAD_BARRIER_DESTROY_PRE: + /* pth_bar_t* */ + evh__HG_PTHREAD_BARRIER_DESTROY_PRE( tid, (void*)args[1] ); + break; + + default: + /* Unhandled Helgrind client request! */ + tl_assert2(0, "unhandled Helgrind client request 0x%lx", + args[0]); + } + + return True; +} + + +/*----------------------------------------------------------------*/ +/*--- Setup ---*/ +/*----------------------------------------------------------------*/ + +static Bool hg_process_cmd_line_option ( Char* arg ) +{ + Char* tmp_str; + + if VG_BOOL_CLO(arg, "--track-lockorders", + HG_(clo_track_lockorders)) {} + else if VG_BOOL_CLO(arg, "--cmp-race-err-addrs", + HG_(clo_cmp_race_err_addrs)) {} + else if VG_BOOL_CLO(arg, "--show-conflicts", + HG_(clo_show_conflicts)) {} + + /* If you change the 10k/10mill limits, remember to also change + them in assertions at the top of event_map_maybe_GC. */ + else if VG_BINT_CLO(arg, "--conflict-cache-size", + HG_(clo_conflict_cache_size), 10*1000, 10*1000*1000) {} + + /* "stuvwx" --> stuvwx (binary) */ + else if VG_STR_CLO(arg, "--hg-sanity-flags", tmp_str) { + Int j; + + if (6 != VG_(strlen)(tmp_str)) { + VG_(message)(Vg_UserMsg, + "--hg-sanity-flags argument must have 6 digits"); + return False; + } + for (j = 0; j < 6; j++) { + if ('0' == tmp_str[j]) { /* do nothing */ } + else if ('1' == tmp_str[j]) HG_(clo_sanity_flags) |= (1 << (6-1-j)); + else { + VG_(message)(Vg_UserMsg, "--hg-sanity-flags argument can " + "only contain 0s and 1s"); + return False; + } + } + if (0) VG_(printf)("XXX sanity flags: 0x%lx\n", HG_(clo_sanity_flags)); + } + + else + return VG_(replacement_malloc_process_cmd_line_option)(arg); + + return True; +} + +static void hg_print_usage ( void ) +{ + VG_(printf)( +" --track-lockorders=no|yes show lock ordering errors? [yes]\n" +" --show-conflicts=no|yes show both stack traces in a race? [yes]\n" +" --conflict-cache-size=N size of conflict history cache [1000000]\n" + ); + VG_(replacement_malloc_print_usage)(); +} + +static void hg_print_debug_usage ( void ) +{ + VG_(replacement_malloc_print_debug_usage)(); + VG_(printf)(" --cmp-race-err-addrs=no|yes are data addresses in " + "race errors significant? [no]\n"); + VG_(printf)(" --hg-sanity-flags=<XXXXXX> sanity check " + " at events (X = 0|1) [000000]\n"); + VG_(printf)(" --hg-sanity-flags values:\n"); + VG_(printf)(" 010000 after changes to " + "lock-order-acquisition-graph\n"); + VG_(printf)(" 001000 at memory accesses (NB: not currently used)\n"); + VG_(printf)(" 000100 at mem permission setting for " + "ranges >= %d bytes\n", SCE_BIGRANGE_T); + VG_(printf)(" 000010 at lock/unlock events\n"); + VG_(printf)(" 000001 at thread create/join events\n"); +} + +static void hg_post_clo_init ( void ) +{ +} + +static void hg_fini ( Int exitcode ) +{ + if (SHOW_DATA_STRUCTURES) + pp_everything( PP_ALL, "SK_(fini)" ); + if (HG_(clo_sanity_flags)) + all__sanity_check("SK_(fini)"); + + if (VG_(clo_verbosity) >= 2) { + + if (1) { + VG_(printf)("\n"); + HG_(ppWSUstats)( univ_tsets, "univ_tsets" ); + VG_(printf)("\n"); + HG_(ppWSUstats)( univ_lsets, "univ_lsets" ); + VG_(printf)("\n"); + HG_(ppWSUstats)( univ_laog, "univ_laog" ); + } + + //zz VG_(printf)("\n"); + //zz VG_(printf)(" hbefore: %'10lu queries\n", stats__hbefore_queries); + //zz VG_(printf)(" hbefore: %'10lu cache 0 hits\n", stats__hbefore_cache0s); + //zz VG_(printf)(" hbefore: %'10lu cache > 0 hits\n", stats__hbefore_cacheNs); + //zz VG_(printf)(" hbefore: %'10lu graph searches\n", stats__hbefore_gsearches); + //zz VG_(printf)(" hbefore: %'10lu of which slow\n", + //zz stats__hbefore_gsearches - stats__hbefore_gsearchFs); + //zz VG_(printf)(" hbefore: %'10lu stack high water mark\n", + //zz stats__hbefore_stk_hwm); + //zz VG_(printf)(" hbefore: %'10lu cache invals\n", stats__hbefore_invals); + //zz VG_(printf)(" hbefore: %'10lu probes\n", stats__hbefore_probes); + + VG_(printf)("\n"); + VG_(printf)(" locksets: %'8d unique lock sets\n", + (Int)HG_(cardinalityWSU)( univ_lsets )); + VG_(printf)(" threadsets: %'8d unique thread sets\n", + (Int)HG_(cardinalityWSU)( univ_tsets )); + VG_(printf)(" univ_laog: %'8d unique lock sets\n", + (Int)HG_(cardinalityWSU)( univ_laog )); + + //VG_(printf)("L(ast)L(ock) map: %'8lu inserts (%d map size)\n", + // stats__ga_LL_adds, + // (Int)(ga_to_lastlock ? VG_(sizeFM)( ga_to_lastlock ) : 0) ); + + VG_(printf)(" LockN-to-P map: %'8llu queries (%llu map size)\n", + HG_(stats__LockN_to_P_queries), + HG_(stats__LockN_to_P_get_map_size)() ); + + VG_(printf)("string table map: %'8llu queries (%llu map size)\n", + HG_(stats__string_table_queries), + HG_(stats__string_table_get_map_size)() ); + VG_(printf)(" LAOG: %'8d map size\n", + (Int)(laog ? VG_(sizeFM)( laog ) : 0)); + VG_(printf)(" LAOG exposition: %'8d map size\n", + (Int)(laog_exposition ? VG_(sizeFM)( laog_exposition ) : 0)); + VG_(printf)(" locks: %'8lu acquires, " + "%'lu releases\n", + stats__lockN_acquires, + stats__lockN_releases + ); + VG_(printf)(" sanity checks: %'8lu\n", stats__sanity_checks); + + VG_(printf)("\n"); + libhb_shutdown(True); + } +} + +/* FIXME: move these somewhere sane */ + +static +void for_libhb__get_stacktrace ( Thr* hbt, Addr* frames, UWord nRequest ) +{ + Thread* thr; + ThreadId tid; + UWord nActual; + tl_assert(hbt); + thr = libhb_get_Thr_opaque( hbt ); + tl_assert(thr); + tid = map_threads_maybe_reverse_lookup_SLOW(thr); + nActual = (UWord)VG_(get_StackTrace)( tid, frames, (UInt)nRequest, + NULL, NULL, 0 ); + tl_assert(nActual <= nRequest); + for (; nActual < nRequest; nActual++) + frames[nActual] = 0; +} + +static +ExeContext* for_libhb__get_EC ( Thr* hbt ) +{ + Thread* thr; + ThreadId tid; + ExeContext* ec; + tl_assert(hbt); + thr = libhb_get_Thr_opaque( hbt ); + tl_assert(thr); + tid = map_threads_maybe_reverse_lookup_SLOW(thr); + ec = VG_(record_ExeContext)( tid, 0 ); + return ec; +} + + +static void hg_pre_clo_init ( void ) +{ + Thr* hbthr_root; + VG_(details_name) ("Helgrind"); + VG_(details_version) (NULL); + VG_(details_description) ("a thread error detector"); + VG_(details_copyright_author)( + "Copyright (C) 2007-2009, and GNU GPL'd, by OpenWorks LLP et al."); + VG_(details_bug_reports_to) (VG_BUGS_TO); + VG_(details_avg_translation_sizeB) ( 200 ); + + VG_(basic_tool_funcs) (hg_post_clo_init, + hg_instrument, + hg_fini); + + VG_(needs_core_errors) (); + VG_(needs_tool_errors) (HG_(eq_Error), + HG_(pp_Error), + False,/*show TIDs for errors*/ + HG_(update_extra), + HG_(recognised_suppression), + HG_(read_extra_suppression_info), + HG_(error_matches_suppression), + HG_(get_error_name), + HG_(print_extra_suppression_info)); + + VG_(needs_command_line_options)(hg_process_cmd_line_option, + hg_print_usage, + hg_print_debug_usage); + VG_(needs_client_requests) (hg_handle_client_request); + + // FIXME? + //VG_(needs_sanity_checks) (hg_cheap_sanity_check, + // hg_expensive_sanity_check); + + VG_(needs_malloc_replacement) (hg_cli__malloc, + hg_cli____builtin_new, + hg_cli____builtin_vec_new, + hg_cli__memalign, + hg_cli__calloc, + hg_cli__free, + hg_cli____builtin_delete, + hg_cli____builtin_vec_delete, + hg_cli__realloc, + hg_cli_malloc_usable_size, + HG_CLI__MALLOC_REDZONE_SZB ); + + /* 21 Dec 08: disabled this; it mostly causes H to start more + slowly and use significantly more memory, without very often + providing useful results. The user can request to load this + information manually with --read-var-info=yes. */ + if (0) VG_(needs_var_info)(); /* optional */ + + VG_(track_new_mem_startup) ( evh__new_mem_w_perms ); + VG_(track_new_mem_stack_signal)( evh__new_mem_w_tid ); + VG_(track_new_mem_brk) ( evh__new_mem_w_tid ); + VG_(track_new_mem_mmap) ( evh__new_mem_w_perms ); + VG_(track_new_mem_stack) ( evh__new_mem ); + + // FIXME: surely this isn't thread-aware + VG_(track_copy_mem_remap) ( shadow_mem_copy_range ); + + VG_(track_change_mem_mprotect) ( evh__set_perms ); + + VG_(track_die_mem_stack_signal)( evh__die_mem ); + VG_(track_die_mem_brk) ( evh__die_mem ); + VG_(track_die_mem_munmap) ( evh__die_mem ); + VG_(track_die_mem_stack) ( evh__die_mem ); + + // FIXME: what is this for? + VG_(track_ban_mem_stack) (NULL); + + VG_(track_pre_mem_read) ( evh__pre_mem_read ); + VG_(track_pre_mem_read_asciiz) ( evh__pre_mem_read_asciiz ); + VG_(track_pre_mem_write) ( evh__pre_mem_write ); + VG_(track_post_mem_write) (NULL); + + ///////////////// + + VG_(track_pre_thread_ll_create)( evh__pre_thread_ll_create ); + VG_(track_pre_thread_ll_exit) ( evh__pre_thread_ll_exit ); + + VG_(track_start_client_code)( evh__start_client_code ); + VG_(track_stop_client_code)( evh__stop_client_code ); + + ///////////////////////////////////////////// + hbthr_root = libhb_init( for_libhb__get_stacktrace, + for_libhb__get_EC ); + ///////////////////////////////////////////// + + initialise_data_structures(hbthr_root); + + /* Ensure that requirements for "dodgy C-as-C++ style inheritance" + as described in comments at the top of pub_tool_hashtable.h, are + met. Blargh. */ + tl_assert( sizeof(void*) == sizeof(struct _MallocMeta*) ); + tl_assert( sizeof(UWord) == sizeof(Addr) ); + hg_mallocmeta_table + = VG_(HT_construct)( "hg_malloc_metadata_table" ); + +} + +VG_DETERMINE_INTERFACE_VERSION(hg_pre_clo_init) + +/*--------------------------------------------------------------------*/ +/*--- end hg_main.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/hg_wordset.c b/helgrind/hg_wordset.c new file mode 100644 index 0000000..5d33004 --- /dev/null +++ b/helgrind/hg_wordset.c @@ -0,0 +1,860 @@ + +/*--------------------------------------------------------------------*/ +/*--- Sets of words, with unique set identifiers. ---*/ +/*--- hg_wordset.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks LLP + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. + + Neither the names of the U.S. Department of Energy nor the + University of California nor the names of its contributors may be + used to endorse or promote products derived from this software + without prior written permission. +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_libcassert.h" +#include "pub_tool_libcbase.h" +#include "pub_tool_libcprint.h" +#include "pub_tool_threadstate.h" +#include "pub_tool_wordfm.h" + +#include "hg_basics.h" +#include "hg_wordset.h" /* self */ + +//------------------------------------------------------------------// +//--- Word Cache ---// +//------------------------------------------------------------------// + +typedef + struct { UWord arg1; UWord arg2; UWord res; } + WCacheEnt; + +/* Each cache is a fixed sized array of N_WCACHE_STAT_MAX entries. + However only the first .dynMax are used. This is because at some + point, expanding the cache further overall gives a slowdown because + searching more entries more than negates any performance advantage + from caching those entries in the first place. Hence use .dynMax + to allow the size of the cache(s) to be set differently for each + different WordSetU. */ +#define N_WCACHE_STAT_MAX 32 +typedef + struct { + WCacheEnt ent[N_WCACHE_STAT_MAX]; + UWord dynMax; /* 1 .. N_WCACHE_STAT_MAX inclusive */ + UWord inUse; /* 0 .. dynMax inclusive */ + } + WCache; + +#define WCache_INIT(_zzcache,_zzdynmax) \ + do { \ + tl_assert((_zzdynmax) >= 1); \ + tl_assert((_zzdynmax) <= N_WCACHE_STAT_MAX); \ + (_zzcache).dynMax = (_zzdynmax); \ + (_zzcache).inUse = 0; \ + } while (0) + +#define WCache_LOOKUP_AND_RETURN(_retty,_zzcache,_zzarg1,_zzarg2) \ + do { \ + UWord _i; \ + UWord _arg1 = (UWord)(_zzarg1); \ + UWord _arg2 = (UWord)(_zzarg2); \ + WCache* _cache = &(_zzcache); \ + tl_assert(_cache->dynMax >= 1); \ + tl_assert(_cache->dynMax <= N_WCACHE_STAT_MAX); \ + tl_assert(_cache->inUse >= 0); \ + tl_assert(_cache->inUse <= _cache->dynMax); \ + if (_cache->inUse > 0) { \ + if (_cache->ent[0].arg1 == _arg1 \ + && _cache->ent[0].arg2 == _arg2) \ + return (_retty)_cache->ent[0].res; \ + for (_i = 1; _i < _cache->inUse; _i++) { \ + if (_cache->ent[_i].arg1 == _arg1 \ + && _cache->ent[_i].arg2 == _arg2) { \ + WCacheEnt tmp = _cache->ent[_i-1]; \ + _cache->ent[_i-1] = _cache->ent[_i]; \ + _cache->ent[_i] = tmp; \ + return (_retty)_cache->ent[_i-1].res; \ + } \ + } \ + } \ + } while (0) + +#define WCache_UPDATE(_zzcache,_zzarg1,_zzarg2,_zzresult) \ + do { \ + Word _i; \ + UWord _arg1 = (UWord)(_zzarg1); \ + UWord _arg2 = (UWord)(_zzarg2); \ + UWord _res = (UWord)(_zzresult); \ + WCache* _cache = &(_zzcache); \ + tl_assert(_cache->dynMax >= 1); \ + tl_assert(_cache->dynMax <= N_WCACHE_STAT_MAX); \ + tl_assert(_cache->inUse >= 0); \ + tl_assert(_cache->inUse <= _cache->dynMax); \ + if (_cache->inUse < _cache->dynMax) \ + _cache->inUse++; \ + for (_i = _cache->inUse-1; _i >= 1; _i--) \ + _cache->ent[_i] = _cache->ent[_i-1]; \ + _cache->ent[0].arg1 = _arg1; \ + _cache->ent[0].arg2 = _arg2; \ + _cache->ent[0].res = _res; \ + } while (0) + + +//------------------------------------------------------------------// +//--- WordSet ---// +//--- Implementation ---// +//------------------------------------------------------------------// + +typedef + struct { + WordSetU* owner; /* for sanity checking */ + UWord* words; + UWord size; /* Really this should be SizeT */ + } + WordVec; + +/* ix2vec[0 .. ix2vec_used-1] are pointers to the lock sets (WordVecs) + really. vec2ix is the inverse mapping, mapping WordVec* to the + corresponding ix2vec entry number. The two mappings are mutually + redundant. */ +struct _WordSetU { + void* (*alloc)(HChar*,SizeT); + HChar* cc; + void (*dealloc)(void*); + WordFM* vec2ix; /* WordVec-to-WordSet mapping tree */ + WordVec** ix2vec; /* WordSet-to-WordVec mapping array */ + UWord ix2vec_size; + UWord ix2vec_used; + WordSet empty; /* cached, for speed */ + /* Caches for some operations */ + WCache cache_addTo; + WCache cache_delFrom; + WCache cache_intersect; + WCache cache_minus; + /* Stats */ + UWord n_add; + UWord n_add_uncached; + UWord n_del; + UWord n_del_uncached; + UWord n_union; + UWord n_intersect; + UWord n_intersect_uncached; + UWord n_minus; + UWord n_minus_uncached; + UWord n_elem; + UWord n_doubleton; + UWord n_isEmpty; + UWord n_isSingleton; + UWord n_anyElementOf; + UWord n_isSubsetOf; + }; + +/* Create a new WordVec of the given size. */ + +static WordVec* new_WV_of_size ( WordSetU* wsu, UWord sz ) +{ + WordVec* wv; + tl_assert(sz >= 0); + wv = wsu->alloc( wsu->cc, sizeof(WordVec) ); + wv->owner = wsu; + wv->words = NULL; + wv->size = sz; + if (sz > 0) { + wv->words = wsu->alloc( wsu->cc, (SizeT)sz * sizeof(UWord) ); + } + return wv; +} + +static void delete_WV ( WordVec* wv ) +{ + void (*dealloc)(void*) = wv->owner->dealloc; + if (wv->words) { + dealloc(wv->words); + } + dealloc(wv); +} +static void delete_WV_for_FM ( UWord wv ) { + delete_WV( (WordVec*)wv ); +} + +static Word cmp_WordVecs_for_FM ( UWord wv1W, UWord wv2W ) +{ + UWord i; + WordVec* wv1 = (WordVec*)wv1W; + WordVec* wv2 = (WordVec*)wv2W; + UWord common = wv1->size < wv2->size ? wv1->size : wv2->size; + for (i = 0; i < common; i++) { + if (wv1->words[i] == wv2->words[i]) + continue; + if (wv1->words[i] < wv2->words[i]) + return -1; + if (wv1->words[i] > wv2->words[i]) + return 1; + tl_assert(0); + } + /* Ok, the common sections are identical. So now consider the + tails. Both sets are considered to finish in an implied + sequence of -infinity. */ + if (wv1->size < wv2->size) { + tl_assert(common == wv1->size); + return -1; /* impliedly, wv1 contains some -infinitys in places + where wv2 doesn't. */ + } + if (wv1->size > wv2->size) { + tl_assert(common == wv2->size); + return 1; + } + tl_assert(common == wv1->size); + return 0; /* identical */ +} + +static void ensure_ix2vec_space ( WordSetU* wsu ) +{ + UInt i, new_sz; + WordVec** new_vec; + tl_assert(wsu->ix2vec_used <= wsu->ix2vec_size); + if (wsu->ix2vec_used < wsu->ix2vec_size) + return; + new_sz = 2 * wsu->ix2vec_size; + if (new_sz == 0) new_sz = 2; + new_vec = wsu->alloc( wsu->cc, new_sz * sizeof(WordVec*) ); + tl_assert(new_vec); + for (i = 0; i < wsu->ix2vec_size; i++) + new_vec[i] = wsu->ix2vec[i]; + if (wsu->ix2vec) + wsu->dealloc(wsu->ix2vec); + wsu->ix2vec = new_vec; + wsu->ix2vec_size = new_sz; +} + +/* Index into a WordSetU, doing the obvious range check. Failure of + the assertions marked XXX and YYY is an indication of passing the + wrong WordSetU* in the public API of this module. */ +static WordVec* do_ix2vec ( WordSetU* wsu, WordSet ws ) +{ + WordVec* wv; + tl_assert(wsu->ix2vec_used <= wsu->ix2vec_size); + if (wsu->ix2vec_used > 0) + tl_assert(wsu->ix2vec); + /* If this assertion fails, it may mean you supplied a 'ws' + that does not come from the 'wsu' universe. */ + tl_assert(ws < wsu->ix2vec_used); /* XXX */ + wv = wsu->ix2vec[ws]; + /* Make absolutely sure that 'ws' is a member of 'wsu'. */ + tl_assert(wv); + tl_assert(wv->owner == wsu); /* YYY */ + return wv; +} + +/* See if wv is contained within wsu. If so, deallocate wv and return + the index of the already-present copy. If not, add wv to both the + vec2ix and ix2vec mappings and return its index. +*/ +static WordSet add_or_dealloc_WordVec( WordSetU* wsu, WordVec* wv_new ) +{ + Bool have; + WordVec* wv_old; + UWord/*Set*/ ix_old = -1; + /* Really WordSet, but need something that can safely be casted to + a Word* in the lookupFM. Making it WordSet (which is 32 bits) + causes failures on a 64-bit platform. */ + tl_assert(wv_new->owner == wsu); + have = VG_(lookupFM)( wsu->vec2ix, + (Word*)&wv_old, (Word*)&ix_old, + (Word)wv_new ); + if (have) { + tl_assert(wv_old != wv_new); + tl_assert(wv_old); + tl_assert(wv_old->owner == wsu); + tl_assert(ix_old < wsu->ix2vec_used); + tl_assert(wsu->ix2vec[ix_old] == wv_old); + delete_WV( wv_new ); + return (WordSet)ix_old; + } else { + ensure_ix2vec_space( wsu ); + tl_assert(wsu->ix2vec); + tl_assert(wsu->ix2vec_used < wsu->ix2vec_size); + wsu->ix2vec[wsu->ix2vec_used] = wv_new; + VG_(addToFM)( wsu->vec2ix, (Word)wv_new, (Word)wsu->ix2vec_used ); + if (0) VG_(printf)("aodW %d\n", (Int)wsu->ix2vec_used ); + wsu->ix2vec_used++; + tl_assert(wsu->ix2vec_used <= wsu->ix2vec_size); + return (WordSet)(wsu->ix2vec_used - 1); + } +} + + +WordSetU* HG_(newWordSetU) ( void* (*alloc_nofail)( HChar*, SizeT ), + HChar* cc, + void (*dealloc)(void*), + Word cacheSize ) +{ + WordSetU* wsu; + WordVec* empty; + + wsu = alloc_nofail( cc, sizeof(WordSetU) ); + VG_(memset)( wsu, 0, sizeof(WordSetU) ); + wsu->alloc = alloc_nofail; + wsu->cc = cc; + wsu->dealloc = dealloc; + wsu->vec2ix = VG_(newFM)( alloc_nofail, cc, + dealloc, cmp_WordVecs_for_FM ); + wsu->ix2vec_used = 0; + wsu->ix2vec_size = 0; + wsu->ix2vec = NULL; + WCache_INIT(wsu->cache_addTo, cacheSize); + WCache_INIT(wsu->cache_delFrom, cacheSize); + WCache_INIT(wsu->cache_intersect, cacheSize); + WCache_INIT(wsu->cache_minus, cacheSize); + empty = new_WV_of_size( wsu, 0 ); + wsu->empty = add_or_dealloc_WordVec( wsu, empty ); + + return wsu; +} + +void HG_(deleteWordSetU) ( WordSetU* wsu ) +{ + void (*dealloc)(void*) = wsu->dealloc; + tl_assert(wsu->vec2ix); + VG_(deleteFM)( wsu->vec2ix, delete_WV_for_FM, NULL/*val-finalizer*/ ); + if (wsu->ix2vec) + dealloc(wsu->ix2vec); + dealloc(wsu); +} + +WordSet HG_(emptyWS) ( WordSetU* wsu ) +{ + return wsu->empty; +} + +Bool HG_(isEmptyWS) ( WordSetU* wsu, WordSet ws ) +{ + WordVec* wv = do_ix2vec( wsu, ws ); + wsu->n_isEmpty++; + if (wv->size == 0) { + tl_assert(ws == wsu->empty); + return True; + } else { + tl_assert(ws != wsu->empty); + return False; + } +} + +Bool HG_(isSingletonWS) ( WordSetU* wsu, WordSet ws, UWord w ) +{ + WordVec* wv; + tl_assert(wsu); + wsu->n_isSingleton++; + wv = do_ix2vec( wsu, ws ); + return (Bool)(wv->size == 1 && wv->words[0] == w); +} + +UWord HG_(cardinalityWS) ( WordSetU* wsu, WordSet ws ) +{ + WordVec* wv; + tl_assert(wsu); + wv = do_ix2vec( wsu, ws ); + tl_assert(wv->size >= 0); + return wv->size; +} + +UWord HG_(anyElementOfWS) ( WordSetU* wsu, WordSet ws ) +{ + WordVec* wv; + tl_assert(wsu); + wsu->n_anyElementOf++; + wv = do_ix2vec( wsu, ws ); + tl_assert(wv->size >= 1); + return wv->words[0]; +} + +UWord HG_(cardinalityWSU) ( WordSetU* wsu ) +{ + tl_assert(wsu); + return wsu->ix2vec_used; +} + +void HG_(getPayloadWS) ( /*OUT*/UWord** words, /*OUT*/UWord* nWords, + WordSetU* wsu, WordSet ws ) +{ + WordVec* wv; + tl_assert(wsu); + wv = do_ix2vec( wsu, ws ); + tl_assert(wv->size >= 0); + *nWords = wv->size; + *words = wv->words; +} + +Bool HG_(plausibleWS) ( WordSetU* wsu, WordSet ws ) +{ + if (wsu == NULL) return False; + if (ws < 0 || ws >= wsu->ix2vec_used) + return False; + return True; +} + +Bool HG_(saneWS_SLOW) ( WordSetU* wsu, WordSet ws ) +{ + WordVec* wv; + UWord i; + if (wsu == NULL) return False; + if (ws < 0 || ws >= wsu->ix2vec_used) + return False; + wv = do_ix2vec( wsu, ws ); + /* can never happen .. do_ix2vec will assert instead. Oh well. */ + if (wv->owner != wsu) return False; + if (wv->size < 0) return False; + if (wv->size > 0) { + for (i = 0; i < wv->size-1; i++) { + if (wv->words[i] >= wv->words[i+1]) + return False; + } + } + return True; +} + +Bool HG_(elemWS) ( WordSetU* wsu, WordSet ws, UWord w ) +{ + UWord i; + WordVec* wv = do_ix2vec( wsu, ws ); + wsu->n_elem++; + for (i = 0; i < wv->size; i++) { + if (wv->words[i] == w) + return True; + } + return False; +} + +WordSet HG_(doubletonWS) ( WordSetU* wsu, UWord w1, UWord w2 ) +{ + WordVec* wv; + wsu->n_doubleton++; + if (w1 == w2) { + wv = new_WV_of_size(wsu, 1); + wv->words[0] = w1; + } + else if (w1 < w2) { + wv = new_WV_of_size(wsu, 2); + wv->words[0] = w1; + wv->words[1] = w2; + } + else { + tl_assert(w1 > w2); + wv = new_WV_of_size(wsu, 2); + wv->words[0] = w2; + wv->words[1] = w1; + } + return add_or_dealloc_WordVec( wsu, wv ); +} + +WordSet HG_(singletonWS) ( WordSetU* wsu, UWord w ) +{ + return HG_(doubletonWS)( wsu, w, w ); +} + +WordSet HG_(isSubsetOf) ( WordSetU* wsu, WordSet small, WordSet big ) +{ + wsu->n_isSubsetOf++; + return small == HG_(intersectWS)( wsu, small, big ); +} + +void HG_(ppWS) ( WordSetU* wsu, WordSet ws ) +{ + UWord i; + WordVec* wv; + tl_assert(wsu); + wv = do_ix2vec( wsu, ws ); + VG_(printf)("{"); + for (i = 0; i < wv->size; i++) { + VG_(printf)("%p", (void*)wv->words[i]); + if (i < wv->size-1) + VG_(printf)(","); + } + VG_(printf)("}"); +} + +void HG_(ppWSUstats) ( WordSetU* wsu, HChar* name ) +{ + VG_(printf)(" WordSet \"%s\":\n", name); + VG_(printf)(" addTo %10lu (%lu uncached)\n", + wsu->n_add, wsu->n_add_uncached); + VG_(printf)(" delFrom %10lu (%lu uncached)\n", + wsu->n_del, wsu->n_del_uncached); + VG_(printf)(" union %10lu\n", wsu->n_union); + VG_(printf)(" intersect %10lu (%lu uncached) " + "[nb. incl isSubsetOf]\n", + wsu->n_intersect, wsu->n_intersect_uncached); + VG_(printf)(" minus %10lu (%lu uncached)\n", + wsu->n_minus, wsu->n_minus_uncached); + VG_(printf)(" elem %10lu\n", wsu->n_elem); + VG_(printf)(" doubleton %10lu\n", wsu->n_doubleton); + VG_(printf)(" isEmpty %10lu\n", wsu->n_isEmpty); + VG_(printf)(" isSingleton %10lu\n", wsu->n_isSingleton); + VG_(printf)(" anyElementOf %10lu\n", wsu->n_anyElementOf); + VG_(printf)(" isSubsetOf %10lu\n", wsu->n_isSubsetOf); +} + +WordSet HG_(addToWS) ( WordSetU* wsu, WordSet ws, UWord w ) +{ + UWord k, j; + WordVec* wv_new; + WordVec* wv; + WordSet result = (WordSet)(-1); /* bogus */ + + wsu->n_add++; + WCache_LOOKUP_AND_RETURN(WordSet, wsu->cache_addTo, ws, w); + wsu->n_add_uncached++; + + /* If already present, this is a no-op. */ + wv = do_ix2vec( wsu, ws ); + for (k = 0; k < wv->size; k++) { + if (wv->words[k] == w) { + result = ws; + goto out; + } + } + /* Ok, not present. Build a new one ... */ + wv_new = new_WV_of_size( wsu, wv->size + 1 ); + k = j = 0; + for (; k < wv->size && wv->words[k] < w; k++) { + wv_new->words[j++] = wv->words[k]; + } + wv_new->words[j++] = w; + for (; k < wv->size; k++) { + tl_assert(wv->words[k] > w); + wv_new->words[j++] = wv->words[k]; + } + tl_assert(j == wv_new->size); + + /* Find any existing copy, or add the new one. */ + result = add_or_dealloc_WordVec( wsu, wv_new ); + tl_assert(result != (WordSet)(-1)); + + out: + WCache_UPDATE(wsu->cache_addTo, ws, w, result); + return result; +} + +WordSet HG_(delFromWS) ( WordSetU* wsu, WordSet ws, UWord w ) +{ + UWord i, j, k; + WordVec* wv_new; + WordSet result = (WordSet)(-1); /* bogus */ + WordVec* wv = do_ix2vec( wsu, ws ); + + wsu->n_del++; + + /* special case empty set */ + if (wv->size == 0) { + tl_assert(ws == wsu->empty); + return ws; + } + + WCache_LOOKUP_AND_RETURN(WordSet, wsu->cache_delFrom, ws, w); + wsu->n_del_uncached++; + + /* If not already present, this is a no-op. */ + for (i = 0; i < wv->size; i++) { + if (wv->words[i] == w) + break; + } + if (i == wv->size) { + result = ws; + goto out; + } + /* So w is present in ws, and the new set will be one element + smaller. */ + tl_assert(i >= 0 && i < wv->size); + tl_assert(wv->size > 0); + + wv_new = new_WV_of_size( wsu, wv->size - 1 ); + j = k = 0; + for (; j < wv->size; j++) { + if (j == i) + continue; + wv_new->words[k++] = wv->words[j]; + } + tl_assert(k == wv_new->size); + + result = add_or_dealloc_WordVec( wsu, wv_new ); + if (wv->size == 1) { + tl_assert(result == wsu->empty); + } + + out: + WCache_UPDATE(wsu->cache_delFrom, ws, w, result); + return result; +} + +WordSet HG_(unionWS) ( WordSetU* wsu, WordSet ws1, WordSet ws2 ) +{ + UWord i1, i2, k, sz; + WordVec* wv_new; + WordVec* wv1 = do_ix2vec( wsu, ws1 ); + WordVec* wv2 = do_ix2vec( wsu, ws2 ); + wsu->n_union++; + sz = 0; + i1 = i2 = 0; + while (1) { + if (i1 >= wv1->size || i2 >= wv2->size) + break; + sz++; + if (wv1->words[i1] < wv2->words[i2]) { + i1++; + } else + if (wv1->words[i1] > wv2->words[i2]) { + i2++; + } else { + i1++; + i2++; + } + } + tl_assert(i1 <= wv1->size); + tl_assert(i2 <= wv2->size); + tl_assert(i1 == wv1->size || i2 == wv2->size); + if (i1 == wv1->size && i2 < wv2->size) { + sz += (wv2->size - i2); + } + if (i2 == wv2->size && i1 < wv1->size) { + sz += (wv1->size - i1); + } + + wv_new = new_WV_of_size( wsu, sz ); + k = 0; + + i1 = i2 = 0; + while (1) { + if (i1 >= wv1->size || i2 >= wv2->size) + break; + if (wv1->words[i1] < wv2->words[i2]) { + wv_new->words[k++] = wv1->words[i1]; + i1++; + } else + if (wv1->words[i1] > wv2->words[i2]) { + wv_new->words[k++] = wv2->words[i2]; + i2++; + } else { + wv_new->words[k++] = wv1->words[i1]; + i1++; + i2++; + } + } + tl_assert(i1 <= wv1->size); + tl_assert(i2 <= wv2->size); + tl_assert(i1 == wv1->size || i2 == wv2->size); + if (i1 == wv1->size && i2 < wv2->size) { + while (i2 < wv2->size) + wv_new->words[k++] = wv2->words[i2++]; + } + if (i2 == wv2->size && i1 < wv1->size) { + while (i1 < wv1->size) + wv_new->words[k++] = wv1->words[i1++]; + } + + tl_assert(k == sz); + + return add_or_dealloc_WordVec( wsu, wv_new ); +} + +WordSet HG_(intersectWS) ( WordSetU* wsu, WordSet ws1, WordSet ws2 ) +{ + UWord i1, i2, k, sz; + WordSet ws_new = (WordSet)(-1); /* bogus */ + WordVec* wv_new; + WordVec* wv1; + WordVec* wv2; + + wsu->n_intersect++; + + /* Deal with an obvious case fast. */ + if (ws1 == ws2) + return ws1; + + /* Since intersect(x,y) == intersect(y,x), convert both variants to + the same query. This reduces the number of variants the cache + has to deal with. */ + if (ws1 > ws2) { + WordSet wst = ws1; ws1 = ws2; ws2 = wst; + } + + WCache_LOOKUP_AND_RETURN(WordSet, wsu->cache_intersect, ws1, ws2); + wsu->n_intersect_uncached++; + + wv1 = do_ix2vec( wsu, ws1 ); + wv2 = do_ix2vec( wsu, ws2 ); + sz = 0; + i1 = i2 = 0; + while (1) { + if (i1 >= wv1->size || i2 >= wv2->size) + break; + if (wv1->words[i1] < wv2->words[i2]) { + i1++; + } else + if (wv1->words[i1] > wv2->words[i2]) { + i2++; + } else { + sz++; + i1++; + i2++; + } + } + tl_assert(i1 <= wv1->size); + tl_assert(i2 <= wv2->size); + tl_assert(i1 == wv1->size || i2 == wv2->size); + + wv_new = new_WV_of_size( wsu, sz ); + k = 0; + + i1 = i2 = 0; + while (1) { + if (i1 >= wv1->size || i2 >= wv2->size) + break; + if (wv1->words[i1] < wv2->words[i2]) { + i1++; + } else + if (wv1->words[i1] > wv2->words[i2]) { + i2++; + } else { + wv_new->words[k++] = wv1->words[i1]; + i1++; + i2++; + } + } + tl_assert(i1 <= wv1->size); + tl_assert(i2 <= wv2->size); + tl_assert(i1 == wv1->size || i2 == wv2->size); + + tl_assert(k == sz); + + ws_new = add_or_dealloc_WordVec( wsu, wv_new ); + if (sz == 0) { + tl_assert(ws_new == wsu->empty); + } + + tl_assert(ws_new != (WordSet)(-1)); + WCache_UPDATE(wsu->cache_intersect, ws1, ws2, ws_new); + + return ws_new; +} + +WordSet HG_(minusWS) ( WordSetU* wsu, WordSet ws1, WordSet ws2 ) +{ + UWord i1, i2, k, sz; + WordSet ws_new = (WordSet)(-1); /* bogus */ + WordVec* wv_new; + WordVec* wv1; + WordVec* wv2; + + wsu->n_minus++; + WCache_LOOKUP_AND_RETURN(WordSet, wsu->cache_minus, ws1, ws2); + wsu->n_minus_uncached++; + + wv1 = do_ix2vec( wsu, ws1 ); + wv2 = do_ix2vec( wsu, ws2 ); + sz = 0; + i1 = i2 = 0; + while (1) { + if (i1 >= wv1->size || i2 >= wv2->size) + break; + if (wv1->words[i1] < wv2->words[i2]) { + sz++; + i1++; + } else + if (wv1->words[i1] > wv2->words[i2]) { + i2++; + } else { + i1++; + i2++; + } + } + tl_assert(i1 <= wv1->size); + tl_assert(i2 <= wv2->size); + tl_assert(i1 == wv1->size || i2 == wv2->size); + if (i2 == wv2->size && i1 < wv1->size) { + sz += (wv1->size - i1); + } + + wv_new = new_WV_of_size( wsu, sz ); + k = 0; + + i1 = i2 = 0; + while (1) { + if (i1 >= wv1->size || i2 >= wv2->size) + break; + if (wv1->words[i1] < wv2->words[i2]) { + wv_new->words[k++] = wv1->words[i1]; + i1++; + } else + if (wv1->words[i1] > wv2->words[i2]) { + i2++; + } else { + i1++; + i2++; + } + } + tl_assert(i1 <= wv1->size); + tl_assert(i2 <= wv2->size); + tl_assert(i1 == wv1->size || i2 == wv2->size); + if (i2 == wv2->size && i1 < wv1->size) { + while (i1 < wv1->size) + wv_new->words[k++] = wv1->words[i1++]; + } + + tl_assert(k == sz); + + ws_new = add_or_dealloc_WordVec( wsu, wv_new ); + if (sz == 0) { + tl_assert(ws_new == wsu->empty); + } + + tl_assert(ws_new != (WordSet)(-1)); + WCache_UPDATE(wsu->cache_minus, ws1, ws2, ws_new); + + return ws_new; +} + +static __attribute__((unused)) +void show_WS ( WordSetU* wsu, WordSet ws ) +{ + UWord i; + WordVec* wv = do_ix2vec( wsu, ws ); + VG_(printf)("#%u{", ws); + for (i = 0; i < wv->size; i++) { + VG_(printf)("%lu", wv->words[i]); + if (i < wv->size-1) + VG_(printf)(","); + } + VG_(printf)("}\n"); +} + +//------------------------------------------------------------------// +//--- end WordSet ---// +//--- Implementation ---// +//------------------------------------------------------------------// + +/*--------------------------------------------------------------------*/ +/*--- end hg_wordset.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/hg_wordset.h b/helgrind/hg_wordset.h new file mode 100644 index 0000000..1d1a72f --- /dev/null +++ b/helgrind/hg_wordset.h @@ -0,0 +1,101 @@ + +/*--------------------------------------------------------------------*/ +/*--- Sets of words, with unique set identifiers. ---*/ +/*--- hg_wordset.h ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Helgrind, a Valgrind tool for detecting errors + in threaded programs. + + Copyright (C) 2007-2009 OpenWorks LLP + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. + + Neither the names of the U.S. Department of Energy nor the + University of California nor the names of its contributors may be + used to endorse or promote products derived from this software + without prior written permission. +*/ + +#ifndef __HG_WORDSET_H +#define __HG_WORDSET_H + +//------------------------------------------------------------------// +//--- WordSet ---// +//--- Public Interface ---// +//------------------------------------------------------------------// + +typedef struct _WordSetU WordSetU; /* opaque */ + +typedef UInt WordSet; /* opaque, small int index */ + +/* Allocate and initialise a WordSetU */ +WordSetU* HG_(newWordSetU) ( void* (*alloc_nofail)( HChar*, SizeT ), + HChar* cc, + void (*dealloc)(void*), + Word cacheSize ); + +/* Free up the WordSetU. */ +void HG_(deleteWordSetU) ( WordSetU* ); + +/* Get the number of elements in this WordSetU. */ +UWord HG_(cardinalityWSU) ( WordSetU* ); + +/* Show performance stats for this WordSetU. */ +void HG_(ppWSUstats) ( WordSetU* wsu, HChar* name ); + + +/* Element-level operations on WordSets. Note that the WordSet + numbers given out are 0, 1, 2, 3, etc, and as it happens 0 always + represents the empty set. */ + +WordSet HG_(emptyWS) ( WordSetU* ); +WordSet HG_(addToWS) ( WordSetU*, WordSet, UWord ); +WordSet HG_(delFromWS) ( WordSetU*, WordSet, UWord ); +WordSet HG_(unionWS) ( WordSetU*, WordSet, WordSet ); +WordSet HG_(intersectWS) ( WordSetU*, WordSet, WordSet ); +WordSet HG_(minusWS) ( WordSetU*, WordSet, WordSet ); +Bool HG_(isEmptyWS) ( WordSetU*, WordSet ); +Bool HG_(isSingletonWS) ( WordSetU*, WordSet, UWord ); +UWord HG_(anyElementOfWS) ( WordSetU*, WordSet ); +UWord HG_(cardinalityWS) ( WordSetU*, WordSet ); +Bool HG_(elemWS) ( WordSetU*, WordSet, UWord ); +WordSet HG_(doubletonWS) ( WordSetU*, UWord, UWord ); +WordSet HG_(singletonWS) ( WordSetU*, UWord ); +WordSet HG_(isSubsetOf) ( WordSetU*, WordSet, WordSet ); + +Bool HG_(plausibleWS) ( WordSetU*, WordSet ); +Bool HG_(saneWS_SLOW) ( WordSetU*, WordSet ); + +void HG_(ppWS) ( WordSetU*, WordSet ); +void HG_(getPayloadWS) ( /*OUT*/UWord** words, /*OUT*/UWord* nWords, + WordSetU*, WordSet ); + + +//------------------------------------------------------------------// +//--- end WordSet ---// +//--- Public Interface ---// +//------------------------------------------------------------------// + +#endif /* ! __HG_WORDSET_H */ + +/*--------------------------------------------------------------------*/ +/*--- end hg_wordset.h ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/libhb.h b/helgrind/libhb.h new file mode 100644 index 0000000..b204883 --- /dev/null +++ b/helgrind/libhb.h @@ -0,0 +1,156 @@ + +/*--------------------------------------------------------------------*/ +/*--- LibHB: a library for implementing and checking ---*/ +/*--- the happens-before relationship in concurrent programs. ---*/ +/*--- libhb_main.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of LibHB, a library for implementing and checking + the happens-before relationship in concurrent programs. + + Copyright (C) 2008-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#ifndef __LIBHB_H +#define __LIBHB_H + +/* Abstract to user: thread identifiers */ +/* typedef struct _Thr Thr; */ /* now in hg_lock_n_thread.h */ + +/* Abstract to user: synchronisation objects */ +/* typedef struct _SO SO; */ /* now in hg_lock_n_thread.h */ + +/* Initialise library; returns Thr* for root thread. 'shadow_alloc' + should never return NULL, instead it should simply not return if + they encounter an out-of-memory condition. */ +Thr* libhb_init ( + void (*get_stacktrace)( Thr*, Addr*, UWord ), + ExeContext* (*get_EC)( Thr* ) + ); + +/* Shut down the library, and print stats (in fact that's _all_ + this is for.) */ +void libhb_shutdown ( Bool show_stats ); + +/* Thread creation: returns Thr* for new thread */ +Thr* libhb_create ( Thr* parent ); + +/* Thread async exit */ +void libhb_async_exit ( Thr* exitter ); + +/* Synchronisation objects (abstract to caller) */ + +/* Allocate a new one (alloc'd by library) */ +SO* libhb_so_alloc ( void ); + +/* Dealloc one */ +void libhb_so_dealloc ( SO* so ); + +/* Send a message via a sync object. If strong_send is true, the + resulting inter-thread dependency seen by a future receiver of this + message will be a dependency on this thread only. That is, in a + strong send, the VC inside the SO is replaced by the clock of the + sending thread. For a weak send, the sender's VC is joined into + that already in the SO, if any. This subtlety is needed to model + rwlocks: a strong send corresponds to releasing a rwlock that had + been w-held (or releasing a standard mutex). A weak send + corresponds to releasing a rwlock that has been r-held. + + (rationale): Since in general many threads may hold a rwlock in + r-mode, a weak send facility is necessary in order that the final + SO reflects the join of the VCs of all the threads releasing the + rwlock, rather than merely holding the VC of the most recent thread + to release it. */ +void libhb_so_send ( Thr* thr, SO* so, Bool strong_send ); + +/* Recv a message from a sync object. If strong_recv is True, the + resulting inter-thread dependency is considered adequate to induce + a h-b ordering on both reads and writes. If it is False, the + implied h-b ordering exists only for reads, not writes. This is + subtlety is required in order to support reader-writer locks: a + thread doing a write-acquire of a rwlock (or acquiring a normal + mutex) models this by doing a strong receive. A thread doing a + read-acquire of a rwlock models this by doing a !strong_recv. */ +void libhb_so_recv ( Thr* thr, SO* so, Bool strong_recv ); + +/* Has this SO ever been sent on? */ +Bool libhb_so_everSent ( SO* so ); + +/* Memory accesses (1/2/4/8 byte size). They report a race if one is + found. */ +#define LIBHB_WRITE_1(_thr,_a) zsm_apply8___msm_write((_thr),(_a)) +#define LIBHB_WRITE_2(_thr,_a) zsm_apply16___msm_write((_thr),(_a)) +#define LIBHB_WRITE_4(_thr,_a) zsm_apply32___msm_write((_thr),(_a)) +#define LIBHB_WRITE_8(_thr,_a) zsm_apply64___msm_write((_thr),(_a)) +#define LIBHB_WRITE_N(_thr,_a,_n) zsm_apply_range___msm_read((_thr),(_a),(_n)) + +#define LIBHB_READ_1(_thr,_a) zsm_apply8___msm_read((_thr),(_a)) +#define LIBHB_READ_2(_thr,_a) zsm_apply16___msm_read((_thr),(_a)) +#define LIBHB_READ_4(_thr,_a) zsm_apply32___msm_read((_thr),(_a)) +#define LIBHB_READ_8(_thr,_a) zsm_apply64___msm_read((_thr),(_a)) +#define LIBHB_READ_N(_thr,_a,_n) zsm_apply_range___msm_read((_thr),(_a),(_n)) + +void zsm_apply8___msm_write ( Thr* thr, Addr a ); +void zsm_apply16___msm_write ( Thr* thr, Addr a ); +void zsm_apply32___msm_write ( Thr* thr, Addr a ); +void zsm_apply64___msm_write ( Thr* thr, Addr a ); +void zsm_apply_range___msm_write ( Thr* thr, + Addr a, SizeT len ); + +void zsm_apply8___msm_read ( Thr* thr, Addr a ); +void zsm_apply16___msm_read ( Thr* thr, Addr a ); +void zsm_apply32___msm_read ( Thr* thr, Addr a ); +void zsm_apply64___msm_read ( Thr* thr, Addr a ); +void zsm_apply_range___msm_read ( Thr* thr, + Addr a, SizeT len ); + + +/* Set memory address ranges to new (freshly allocated), or noaccess + (no longer accessible). */ +void libhb_range_new ( Thr*, Addr, SizeT ); +void libhb_range_noaccess ( Thr*, Addr, SizeT ); + +/* For the convenience of callers, we offer to store one void* item in + a Thr, which we ignore, but the caller can get or set any time. */ +void* libhb_get_Thr_opaque ( Thr* ); +void libhb_set_Thr_opaque ( Thr*, void* ); + +/* Low level copy of shadow state from [src,src+len) to [dst,dst+len). + Overlapping moves are checked for and asserted against. */ +void libhb_copy_shadow_state ( Addr src, Addr dst, SizeT len ); + +/* Call this periodically to give libhb the opportunity to + garbage-collect its internal data structures. */ +void libhb_maybe_GC ( void ); + +/* Extract info from the conflicting-access machinery. */ +Bool libhb_event_map_lookup ( /*OUT*/ExeContext** resEC, + /*OUT*/Thr** resThr, + /*OUT*/SizeT* resSzB, + /*OUT*/Bool* resIsW, + Thr* thr, Addr a, SizeT szB, Bool isW ); + +#endif /* __LIBHB_H */ + +/*--------------------------------------------------------------------*/ +/*--- end libhb.h ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/libhb_core.c b/helgrind/libhb_core.c new file mode 100644 index 0000000..572b26b --- /dev/null +++ b/helgrind/libhb_core.c @@ -0,0 +1,5011 @@ + +/*--------------------------------------------------------------------*/ +/*--- LibHB: a library for implementing and checking ---*/ +/*--- the happens-before relationship in concurrent programs. ---*/ +/*--- libhb_main.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of LibHB, a library for implementing and checking + the happens-before relationship in concurrent programs. + + Copyright (C) 2008-2009 OpenWorks Ltd + info@open-works.co.uk + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#include "pub_tool_basics.h" +#include "pub_tool_libcassert.h" +#include "pub_tool_libcbase.h" +#include "pub_tool_libcprint.h" +#include "pub_tool_mallocfree.h" +#include "pub_tool_wordfm.h" +#include "pub_tool_sparsewa.h" +#include "pub_tool_xarray.h" +#include "pub_tool_oset.h" +#include "pub_tool_threadstate.h" +#include "pub_tool_aspacemgr.h" +#include "pub_tool_execontext.h" +#include "pub_tool_errormgr.h" +#include "pub_tool_options.h" // VG_(clo_verbosity) +#include "hg_basics.h" +#include "hg_wordset.h" +#include "hg_lock_n_thread.h" +#include "hg_errors.h" + +#include "libhb.h" + + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// Debugging #defines // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + +/* Check the sanity of shadow values in the core memory state + machine. Change #if 0 to #if 1 to enable this. */ +#if 0 +# define CHECK_MSM 1 +#else +# define CHECK_MSM 0 +#endif + + +/* Check sanity (reference counts, etc) in the conflicting access + machinery. Change #if 0 to #if 1 to enable this. */ +#if 0 +# define CHECK_CEM 1 +#else +# define CHECK_CEM 0 +#endif + + +/* Check sanity in the compressed shadow memory machinery, + particularly in its caching innards. Unfortunately there's no + almost-zero-cost way to make them selectable at run time. Hence + set the #if 0 to #if 1 and rebuild if you want them. */ +#if 0 +# define CHECK_ZSM 1 /* do sanity-check CacheLine stuff */ +# define inline __attribute__((noinline)) + /* probably want to ditch -fomit-frame-pointer too */ +#else +# define CHECK_ZSM 0 /* don't sanity-check CacheLine stuff */ +#endif + + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// Forward declarations // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + +/* fwds for + Globals needed by other parts of the library. These are set + once at startup and then never changed. */ +static void (*main_get_stacktrace)( Thr*, Addr*, UWord ) = NULL; +static ExeContext* (*main_get_EC)( Thr* ) = NULL; + + + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// SECTION BEGIN compressed shadow memory // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + +#ifndef __HB_ZSM_H +#define __HB_ZSM_H + +typedef ULong SVal; + +/* This value has special significance to the implementation, and callers + may not store it in the shadow memory. */ +#define SVal_INVALID (3ULL << 62) + +/* This is the default value for shadow memory. Initially the shadow + memory contains no accessible areas and so all reads produce this + value. TODO: make this caller-defineable. */ +#define SVal_NOACCESS (2ULL << 62) + +/* Initialise the library. Once initialised, it will (or may) call + rcinc and rcdec in response to all the calls below, in order to + allow the user to do reference counting on the SVals stored herein. + It is important to understand, however, that due to internal + caching, the reference counts are in general inaccurate, and can be + both above or below the true reference count for an item. In + particular, the library may indicate that the reference count for + an item is zero, when in fact it is not. + + To make the reference counting exact and therefore non-pointless, + call zsm_flush_cache. Immediately after it returns, the reference + counts for all items, as deduced by the caller by observing calls + to rcinc and rcdec, will be correct, and so any items with a zero + reference count may be freed (or at least considered to be + unreferenced by this library). +*/ +static void zsm_init ( void(*rcinc)(SVal), void(*rcdec)(SVal) ); + +static void zsm_set_range ( Addr, SizeT, SVal ); +static SVal zsm_read8 ( Addr ); +static void zsm_copy_range ( Addr, Addr, SizeT ); +static void zsm_flush_cache ( void ); + +#endif /* ! __HB_ZSM_H */ + + +/* Round a up to the next multiple of N. N must be a power of 2 */ +#define ROUNDUP(a, N) ((a + N - 1) & ~(N-1)) +/* Round a down to the next multiple of N. N must be a power of 2 */ +#define ROUNDDN(a, N) ((a) & ~(N-1)) + + + +/* ------ User-supplied RC functions ------ */ +static void(*rcinc)(SVal) = NULL; +static void(*rcdec)(SVal) = NULL; + + +/* ------ CacheLine ------ */ + +#define N_LINE_BITS 6 /* must be >= 3 */ +#define N_LINE_ARANGE (1 << N_LINE_BITS) +#define N_LINE_TREES (N_LINE_ARANGE >> 3) + +typedef + struct { + UShort descrs[N_LINE_TREES]; + SVal svals[N_LINE_ARANGE]; // == N_LINE_TREES * 8 + } + CacheLine; + +#define TREE_DESCR_16_0 (1<<0) +#define TREE_DESCR_32_0 (1<<1) +#define TREE_DESCR_16_1 (1<<2) +#define TREE_DESCR_64 (1<<3) +#define TREE_DESCR_16_2 (1<<4) +#define TREE_DESCR_32_1 (1<<5) +#define TREE_DESCR_16_3 (1<<6) +#define TREE_DESCR_8_0 (1<<7) +#define TREE_DESCR_8_1 (1<<8) +#define TREE_DESCR_8_2 (1<<9) +#define TREE_DESCR_8_3 (1<<10) +#define TREE_DESCR_8_4 (1<<11) +#define TREE_DESCR_8_5 (1<<12) +#define TREE_DESCR_8_6 (1<<13) +#define TREE_DESCR_8_7 (1<<14) +#define TREE_DESCR_DTY (1<<15) + +typedef + struct { + SVal dict[4]; /* can represent up to 4 diff values in the line */ + UChar ix2s[N_LINE_ARANGE/4]; /* array of N_LINE_ARANGE 2-bit + dict indexes */ + /* if dict[0] == SVal_INVALID then dict[1] is the index of the + LineF to use, and dict[2..] are also SVal_INVALID. */ + } + LineZ; /* compressed rep for a cache line */ + +typedef + struct { + Bool inUse; + SVal w64s[N_LINE_ARANGE]; + } + LineF; /* full rep for a cache line */ + +/* Shadow memory. + Primary map is a WordFM Addr SecMap*. + SecMaps cover some page-size-ish section of address space and hold + a compressed representation. + CacheLine-sized chunks of SecMaps are copied into a Cache, being + decompressed when moved into the cache and recompressed on the + way out. Because of this, the cache must operate as a writeback + cache, not a writethrough one. + + Each SecMap must hold a power-of-2 number of CacheLines. Hence + N_SECMAP_BITS must >= N_LINE_BITS. +*/ +#define N_SECMAP_BITS 13 +#define N_SECMAP_ARANGE (1 << N_SECMAP_BITS) + +// # CacheLines held by a SecMap +#define N_SECMAP_ZLINES (N_SECMAP_ARANGE / N_LINE_ARANGE) + +/* The data in the SecMap is held in the array of LineZs. Each LineZ + either carries the required data directly, in a compressed + representation, or it holds (in .dict[0]) an index to the LineF in + .linesF that holds the full representation. + + Currently-unused LineF's have their .inUse bit set to zero. + Since each in-use LineF is referred to be exactly one LineZ, + the number of .linesZ[] that refer to .linesF should equal + the number of .linesF[] that have .inUse == True. + + RC obligations: the RCs presented to the user include exactly + the values in: + * direct Z reps, that is, ones for which .dict[0] != SVal_INVALID + * F reps that are in use (.inUse == True) + + Hence the following actions at the following transitions are required: + + F rep: .inUse==True -> .inUse==False -- rcdec_LineF + F rep: .inUse==False -> .inUse==True -- rcinc_LineF + Z rep: .dict[0] from other to SVal_INVALID -- rcdec_LineZ + Z rep: .dict[0] from SVal_INVALID to other -- rcinc_LineZ +*/ +typedef + struct { + UInt magic; + LineZ linesZ[N_SECMAP_ZLINES]; + LineF* linesF; + UInt linesF_size; + } + SecMap; + +#define SecMap_MAGIC 0x571e58cbU + +static inline Bool is_sane_SecMap ( SecMap* sm ) { + return sm != NULL && sm->magic == SecMap_MAGIC; +} + +/* ------ Cache ------ */ + +#define N_WAY_BITS 16 +#define N_WAY_NENT (1 << N_WAY_BITS) + +/* Each tag is the address of the associated CacheLine, rounded down + to a CacheLine address boundary. A CacheLine size must be a power + of 2 and must be 8 or more. Hence an easy way to initialise the + cache so it is empty is to set all the tag values to any value % 8 + != 0, eg 1. This means all queries in the cache initially miss. + It does however require us to detect and not writeback, any line + with a bogus tag. */ +typedef + struct { + CacheLine lyns0[N_WAY_NENT]; + Addr tags0[N_WAY_NENT]; + } + Cache; + +static inline Bool is_valid_scache_tag ( Addr tag ) { + /* a valid tag should be naturally aligned to the start of + a CacheLine. */ + return 0 == (tag & (N_LINE_ARANGE - 1)); +} + + +/* --------- Primary data structures --------- */ + +/* Shadow memory primary map */ +static WordFM* map_shmem = NULL; /* WordFM Addr SecMap* */ +static Cache cache_shmem; + + +static UWord stats__secmaps_search = 0; // # SM finds +static UWord stats__secmaps_search_slow = 0; // # SM lookupFMs +static UWord stats__secmaps_allocd = 0; // # SecMaps issued +static UWord stats__secmap_ga_space_covered = 0; // # ga bytes covered +static UWord stats__secmap_linesZ_allocd = 0; // # LineZ's issued +static UWord stats__secmap_linesZ_bytes = 0; // .. using this much storage +static UWord stats__secmap_linesF_allocd = 0; // # LineF's issued +static UWord stats__secmap_linesF_bytes = 0; // .. using this much storage +static UWord stats__secmap_iterator_steppings = 0; // # calls to stepSMIter +static UWord stats__cache_Z_fetches = 0; // # Z lines fetched +static UWord stats__cache_Z_wbacks = 0; // # Z lines written back +static UWord stats__cache_F_fetches = 0; // # F lines fetched +static UWord stats__cache_F_wbacks = 0; // # F lines written back +static UWord stats__cache_invals = 0; // # cache invals +static UWord stats__cache_flushes = 0; // # cache flushes +static UWord stats__cache_totrefs = 0; // # total accesses +static UWord stats__cache_totmisses = 0; // # misses +static ULong stats__cache_make_New_arange = 0; // total arange made New +static ULong stats__cache_make_New_inZrep = 0; // arange New'd on Z reps +static UWord stats__cline_normalises = 0; // # calls to cacheline_normalise +static UWord stats__cline_read64s = 0; // # calls to s_m_read64 +static UWord stats__cline_read32s = 0; // # calls to s_m_read32 +static UWord stats__cline_read16s = 0; // # calls to s_m_read16 +static UWord stats__cline_read8s = 0; // # calls to s_m_read8 +static UWord stats__cline_write64s = 0; // # calls to s_m_write64 +static UWord stats__cline_write32s = 0; // # calls to s_m_write32 +static UWord stats__cline_write16s = 0; // # calls to s_m_write16 +static UWord stats__cline_write8s = 0; // # calls to s_m_write8 +static UWord stats__cline_set64s = 0; // # calls to s_m_set64 +static UWord stats__cline_set32s = 0; // # calls to s_m_set32 +static UWord stats__cline_set16s = 0; // # calls to s_m_set16 +static UWord stats__cline_set8s = 0; // # calls to s_m_set8 +static UWord stats__cline_get8s = 0; // # calls to s_m_get8 +static UWord stats__cline_copy8s = 0; // # calls to s_m_copy8 +static UWord stats__cline_64to32splits = 0; // # 64-bit accesses split +static UWord stats__cline_32to16splits = 0; // # 32-bit accesses split +static UWord stats__cline_16to8splits = 0; // # 16-bit accesses split +static UWord stats__cline_64to32pulldown = 0; // # calls to pulldown_to_32 +static UWord stats__cline_32to16pulldown = 0; // # calls to pulldown_to_16 +static UWord stats__cline_16to8pulldown = 0; // # calls to pulldown_to_8 + +static inline Addr shmem__round_to_SecMap_base ( Addr a ) { + return a & ~(N_SECMAP_ARANGE - 1); +} +static inline UWord shmem__get_SecMap_offset ( Addr a ) { + return a & (N_SECMAP_ARANGE - 1); +} + + +/*----------------------------------------------------------------*/ +/*--- map_shmem :: WordFM Addr SecMap ---*/ +/*--- shadow memory (low level handlers) (shmem__* fns) ---*/ +/*----------------------------------------------------------------*/ + +/*--------------- SecMap allocation --------------- */ + +static HChar* shmem__bigchunk_next = NULL; +static HChar* shmem__bigchunk_end1 = NULL; + +static void* shmem__bigchunk_alloc ( SizeT n ) +{ + const SizeT sHMEM__BIGCHUNK_SIZE = 4096 * 256 * 4; + tl_assert(n > 0); + n = VG_ROUNDUP(n, 16); + tl_assert(shmem__bigchunk_next <= shmem__bigchunk_end1); + tl_assert(shmem__bigchunk_end1 - shmem__bigchunk_next + <= (SSizeT)sHMEM__BIGCHUNK_SIZE); + if (shmem__bigchunk_next + n > shmem__bigchunk_end1) { + if (0) + VG_(printf)("XXXXX bigchunk: abandoning %d bytes\n", + (Int)(shmem__bigchunk_end1 - shmem__bigchunk_next)); + shmem__bigchunk_next = VG_(am_shadow_alloc)( sHMEM__BIGCHUNK_SIZE ); + if (shmem__bigchunk_next == NULL) + VG_(out_of_memory_NORETURN)( + "helgrind:shmem__bigchunk_alloc", sHMEM__BIGCHUNK_SIZE ); + shmem__bigchunk_end1 = shmem__bigchunk_next + sHMEM__BIGCHUNK_SIZE; + } + tl_assert(shmem__bigchunk_next); + tl_assert( 0 == (((Addr)shmem__bigchunk_next) & (16-1)) ); + tl_assert(shmem__bigchunk_next + n <= shmem__bigchunk_end1); + shmem__bigchunk_next += n; + return shmem__bigchunk_next - n; +} + +static SecMap* shmem__alloc_SecMap ( void ) +{ + Word i, j; + SecMap* sm = shmem__bigchunk_alloc( sizeof(SecMap) ); + if (0) VG_(printf)("alloc_SecMap %p\n",sm); + tl_assert(sm); + sm->magic = SecMap_MAGIC; + for (i = 0; i < N_SECMAP_ZLINES; i++) { + sm->linesZ[i].dict[0] = SVal_NOACCESS; + sm->linesZ[i].dict[1] = SVal_INVALID; + sm->linesZ[i].dict[2] = SVal_INVALID; + sm->linesZ[i].dict[3] = SVal_INVALID; + for (j = 0; j < N_LINE_ARANGE/4; j++) + sm->linesZ[i].ix2s[j] = 0; /* all reference dict[0] */ + } + sm->linesF = NULL; + sm->linesF_size = 0; + stats__secmaps_allocd++; + stats__secmap_ga_space_covered += N_SECMAP_ARANGE; + stats__secmap_linesZ_allocd += N_SECMAP_ZLINES; + stats__secmap_linesZ_bytes += N_SECMAP_ZLINES * sizeof(LineZ); + return sm; +} + +typedef struct { Addr gaKey; SecMap* sm; } SMCacheEnt; +static SMCacheEnt smCache[3] = { {1,NULL}, {1,NULL}, {1,NULL} }; + +static SecMap* shmem__find_SecMap ( Addr ga ) +{ + SecMap* sm = NULL; + Addr gaKey = shmem__round_to_SecMap_base(ga); + // Cache + stats__secmaps_search++; + if (LIKELY(gaKey == smCache[0].gaKey)) + return smCache[0].sm; + if (LIKELY(gaKey == smCache[1].gaKey)) { + SMCacheEnt tmp = smCache[0]; + smCache[0] = smCache[1]; + smCache[1] = tmp; + return smCache[0].sm; + } + if (gaKey == smCache[2].gaKey) { + SMCacheEnt tmp = smCache[1]; + smCache[1] = smCache[2]; + smCache[2] = tmp; + return smCache[1].sm; + } + // end Cache + stats__secmaps_search_slow++; + if (VG_(lookupFM)( map_shmem, + NULL/*keyP*/, (UWord*)&sm, (UWord)gaKey )) { + tl_assert(sm != NULL); + smCache[2] = smCache[1]; + smCache[1] = smCache[0]; + smCache[0].gaKey = gaKey; + smCache[0].sm = sm; + } else { + tl_assert(sm == NULL); + } + return sm; +} + +static SecMap* shmem__find_or_alloc_SecMap ( Addr ga ) +{ + SecMap* sm = shmem__find_SecMap ( ga ); + if (LIKELY(sm)) { + return sm; + } else { + /* create a new one */ + Addr gaKey = shmem__round_to_SecMap_base(ga); + sm = shmem__alloc_SecMap(); + tl_assert(sm); + VG_(addToFM)( map_shmem, (UWord)gaKey, (UWord)sm ); + return sm; + } +} + + +/* ------------ LineF and LineZ related ------------ */ + +static void rcinc_LineF ( LineF* lineF ) { + UWord i; + tl_assert(lineF->inUse); + for (i = 0; i < N_LINE_ARANGE; i++) + rcinc(lineF->w64s[i]); +} + +static void rcdec_LineF ( LineF* lineF ) { + UWord i; + tl_assert(lineF->inUse); + for (i = 0; i < N_LINE_ARANGE; i++) + rcdec(lineF->w64s[i]); +} + +static void rcinc_LineZ ( LineZ* lineZ ) { + tl_assert(lineZ->dict[0] != SVal_INVALID); + rcinc(lineZ->dict[0]); + if (lineZ->dict[1] != SVal_INVALID) rcinc(lineZ->dict[1]); + if (lineZ->dict[2] != SVal_INVALID) rcinc(lineZ->dict[2]); + if (lineZ->dict[3] != SVal_INVALID) rcinc(lineZ->dict[3]); +} + +static void rcdec_LineZ ( LineZ* lineZ ) { + tl_assert(lineZ->dict[0] != SVal_INVALID); + rcdec(lineZ->dict[0]); + if (lineZ->dict[1] != SVal_INVALID) rcdec(lineZ->dict[1]); + if (lineZ->dict[2] != SVal_INVALID) rcdec(lineZ->dict[2]); + if (lineZ->dict[3] != SVal_INVALID) rcdec(lineZ->dict[3]); +} + +inline +static void write_twobit_array ( UChar* arr, UWord ix, UWord b2 ) { + Word bix, shft, mask, prep; + tl_assert(ix >= 0); + bix = ix >> 2; + shft = 2 * (ix & 3); /* 0, 2, 4 or 6 */ + mask = 3 << shft; + prep = b2 << shft; + arr[bix] = (arr[bix] & ~mask) | prep; +} + +inline +static UWord read_twobit_array ( UChar* arr, UWord ix ) { + Word bix, shft; + tl_assert(ix >= 0); + bix = ix >> 2; + shft = 2 * (ix & 3); /* 0, 2, 4 or 6 */ + return (arr[bix] >> shft) & 3; +} + +/* Given address 'tag', find either the Z or F line containing relevant + data, so it can be read into the cache. +*/ +static void find_ZF_for_reading ( /*OUT*/LineZ** zp, + /*OUT*/LineF** fp, Addr tag ) { + LineZ* lineZ; + LineF* lineF; + UWord zix; + SecMap* sm = shmem__find_or_alloc_SecMap(tag); + UWord smoff = shmem__get_SecMap_offset(tag); + /* since smoff is derived from a valid tag, it should be + cacheline-aligned. */ + tl_assert(0 == (smoff & (N_LINE_ARANGE - 1))); + zix = smoff >> N_LINE_BITS; + tl_assert(zix < N_SECMAP_ZLINES); + lineZ = &sm->linesZ[zix]; + lineF = NULL; + if (lineZ->dict[0] == SVal_INVALID) { + UInt fix = (UInt)lineZ->dict[1]; + tl_assert(sm->linesF); + tl_assert(sm->linesF_size > 0); + tl_assert(fix >= 0 && fix < sm->linesF_size); + lineF = &sm->linesF[fix]; + tl_assert(lineF->inUse); + lineZ = NULL; + } + *zp = lineZ; + *fp = lineF; +} + +/* Given address 'tag', return the relevant SecMap and the index of + the LineZ within it, in the expectation that the line is to be + overwritten. Regardless of whether 'tag' is currently associated + with a Z or F representation, to rcdec on the current + representation, in recognition of the fact that the contents are + just about to be overwritten. */ +static __attribute__((noinline)) +void find_Z_for_writing ( /*OUT*/SecMap** smp, + /*OUT*/Word* zixp, + Addr tag ) { + LineZ* lineZ; + LineF* lineF; + UWord zix; + SecMap* sm = shmem__find_or_alloc_SecMap(tag); + UWord smoff = shmem__get_SecMap_offset(tag); + /* since smoff is derived from a valid tag, it should be + cacheline-aligned. */ + tl_assert(0 == (smoff & (N_LINE_ARANGE - 1))); + zix = smoff >> N_LINE_BITS; + tl_assert(zix < N_SECMAP_ZLINES); + lineZ = &sm->linesZ[zix]; + lineF = NULL; + /* re RCs, we are freeing up this LineZ/LineF so that new data can + be parked in it. Hence have to rcdec it accordingly. */ + /* If lineZ has an associated lineF, free it up. */ + if (lineZ->dict[0] == SVal_INVALID) { + UInt fix = (UInt)lineZ->dict[1]; + tl_assert(sm->linesF); + tl_assert(sm->linesF_size > 0); + tl_assert(fix >= 0 && fix < sm->linesF_size); + lineF = &sm->linesF[fix]; + tl_assert(lineF->inUse); + rcdec_LineF(lineF); + lineF->inUse = False; + } else { + rcdec_LineZ(lineZ); + } + *smp = sm; + *zixp = zix; +} + +static __attribute__((noinline)) +void alloc_F_for_writing ( /*MOD*/SecMap* sm, /*OUT*/Word* fixp ) { + UInt i, new_size; + LineF* nyu; + + if (sm->linesF) { + tl_assert(sm->linesF_size > 0); + } else { + tl_assert(sm->linesF_size == 0); + } + + if (sm->linesF) { + for (i = 0; i < sm->linesF_size; i++) { + if (!sm->linesF[i].inUse) { + *fixp = (Word)i; + return; + } + } + } + + /* No free F line found. Expand existing array and try again. */ + new_size = sm->linesF_size==0 ? 1 : 2 * sm->linesF_size; + nyu = HG_(zalloc)( "libhb.aFfw.1 (LineF storage)", + new_size * sizeof(LineF) ); + tl_assert(nyu); + + stats__secmap_linesF_allocd += (new_size - sm->linesF_size); + stats__secmap_linesF_bytes += (new_size - sm->linesF_size) + * sizeof(LineF); + + if (0) + VG_(printf)("SM %p: expand F array from %d to %d\n", + sm, (Int)sm->linesF_size, new_size); + + for (i = 0; i < new_size; i++) + nyu[i].inUse = False; + + if (sm->linesF) { + for (i = 0; i < sm->linesF_size; i++) { + tl_assert(sm->linesF[i].inUse); + nyu[i] = sm->linesF[i]; + } + VG_(memset)(sm->linesF, 0, sm->linesF_size * sizeof(LineF) ); + HG_(free)(sm->linesF); + } + + sm->linesF = nyu; + sm->linesF_size = new_size; + + for (i = 0; i < sm->linesF_size; i++) { + if (!sm->linesF[i].inUse) { + *fixp = (Word)i; + return; + } + } + + /*NOTREACHED*/ + tl_assert(0); +} + + +/* ------------ CacheLine and implicit-tree related ------------ */ + +__attribute__((unused)) +static void pp_CacheLine ( CacheLine* cl ) { + Word i; + if (!cl) { + VG_(printf)("%s","pp_CacheLine(NULL)\n"); + return; + } + for (i = 0; i < N_LINE_TREES; i++) + VG_(printf)(" descr: %04lx\n", (UWord)cl->descrs[i]); + for (i = 0; i < N_LINE_ARANGE; i++) + VG_(printf)(" sval: %08lx\n", (UWord)cl->svals[i]); +} + +static UChar descr_to_validbits ( UShort descr ) +{ + /* a.k.a Party Time for gcc's constant folder */ +# define DESCR(b8_7, b8_6, b8_5, b8_4, b8_3, b8_2, b8_1, b8_0, \ + b16_3, b32_1, b16_2, b64, b16_1, b32_0, b16_0) \ + ( (UShort) ( ( (b8_7) << 14) | ( (b8_6) << 13) | \ + ( (b8_5) << 12) | ( (b8_4) << 11) | \ + ( (b8_3) << 10) | ( (b8_2) << 9) | \ + ( (b8_1) << 8) | ( (b8_0) << 7) | \ + ( (b16_3) << 6) | ( (b32_1) << 5) | \ + ( (b16_2) << 4) | ( (b64) << 3) | \ + ( (b16_1) << 2) | ( (b32_0) << 1) | \ + ( (b16_0) << 0) ) ) + +# define BYTE(bit7, bit6, bit5, bit4, bit3, bit2, bit1, bit0) \ + ( (UChar) ( ( (bit7) << 7) | ( (bit6) << 6) | \ + ( (bit5) << 5) | ( (bit4) << 4) | \ + ( (bit3) << 3) | ( (bit2) << 2) | \ + ( (bit1) << 1) | ( (bit0) << 0) ) ) + + /* these should all get folded out at compile time */ + tl_assert(DESCR(1,0,0,0,0,0,0,0, 0,0,0, 0, 0,0,0) == TREE_DESCR_8_7); + tl_assert(DESCR(0,0,0,0,0,0,0,1, 0,0,0, 0, 0,0,0) == TREE_DESCR_8_0); + tl_assert(DESCR(0,0,0,0,0,0,0,0, 1,0,0, 0, 0,0,0) == TREE_DESCR_16_3); + tl_assert(DESCR(0,0,0,0,0,0,0,0, 0,1,0, 0, 0,0,0) == TREE_DESCR_32_1); + tl_assert(DESCR(0,0,0,0,0,0,0,0, 0,0,1, 0, 0,0,0) == TREE_DESCR_16_2); + tl_assert(DESCR(0,0,0,0,0,0,0,0, 0,0,0, 1, 0,0,0) == TREE_DESCR_64); + tl_assert(DESCR(0,0,0,0,0,0,0,0, 0,0,0, 0, 1,0,0) == TREE_DESCR_16_1); + tl_assert(DESCR(0,0,0,0,0,0,0,0, 0,0,0, 0, 0,1,0) == TREE_DESCR_32_0); + tl_assert(DESCR(0,0,0,0,0,0,0,0, 0,0,0, 0, 0,0,1) == TREE_DESCR_16_0); + + switch (descr) { + /* + +--------------------------------- TREE_DESCR_8_7 + | +------------------- TREE_DESCR_8_0 + | | +---------------- TREE_DESCR_16_3 + | | | +-------------- TREE_DESCR_32_1 + | | | | +------------ TREE_DESCR_16_2 + | | | | | +--------- TREE_DESCR_64 + | | | | | | +------ TREE_DESCR_16_1 + | | | | | | | +---- TREE_DESCR_32_0 + | | | | | | | | +-- TREE_DESCR_16_0 + | | | | | | | | | + | | | | | | | | | GRANULARITY, 7 -> 0 */ + case DESCR(1,1,1,1,1,1,1,1, 0,0,0, 0, 0,0,0): /* 8 8 8 8 8 8 8 8 */ + return BYTE(1,1,1,1,1,1,1,1); + case DESCR(1,1,0,0,1,1,1,1, 0,0,1, 0, 0,0,0): /* 8 8 16 8 8 8 8 */ + return BYTE(1,1,0,1,1,1,1,1); + case DESCR(0,0,1,1,1,1,1,1, 1,0,0, 0, 0,0,0): /* 16 8 8 8 8 8 8 */ + return BYTE(0,1,1,1,1,1,1,1); + case DESCR(0,0,0,0,1,1,1,1, 1,0,1, 0, 0,0,0): /* 16 16 8 8 8 8 */ + return BYTE(0,1,0,1,1,1,1,1); + + case DESCR(1,1,1,1,1,1,0,0, 0,0,0, 0, 0,0,1): /* 8 8 8 8 8 8 16 */ + return BYTE(1,1,1,1,1,1,0,1); + case DESCR(1,1,0,0,1,1,0,0, 0,0,1, 0, 0,0,1): /* 8 8 16 8 8 16 */ + return BYTE(1,1,0,1,1,1,0,1); + case DESCR(0,0,1,1,1,1,0,0, 1,0,0, 0, 0,0,1): /* 16 8 8 8 8 16 */ + return BYTE(0,1,1,1,1,1,0,1); + case DESCR(0,0,0,0,1,1,0,0, 1,0,1, 0, 0,0,1): /* 16 16 8 8 16 */ + return BYTE(0,1,0,1,1,1,0,1); + + case DESCR(1,1,1,1,0,0,1,1, 0,0,0, 0, 1,0,0): /* 8 8 8 8 16 8 8 */ + return BYTE(1,1,1,1,0,1,1,1); + case DESCR(1,1,0,0,0,0,1,1, 0,0,1, 0, 1,0,0): /* 8 8 16 16 8 8 */ + return BYTE(1,1,0,1,0,1,1,1); + case DESCR(0,0,1,1,0,0,1,1, 1,0,0, 0, 1,0,0): /* 16 8 8 16 8 8 */ + return BYTE(0,1,1,1,0,1,1,1); + case DESCR(0,0,0,0,0,0,1,1, 1,0,1, 0, 1,0,0): /* 16 16 16 8 8 */ + return BYTE(0,1,0,1,0,1,1,1); + + case DESCR(1,1,1,1,0,0,0,0, 0,0,0, 0, 1,0,1): /* 8 8 8 8 16 16 */ + return BYTE(1,1,1,1,0,1,0,1); + case DESCR(1,1,0,0,0,0,0,0, 0,0,1, 0, 1,0,1): /* 8 8 16 16 16 */ + return BYTE(1,1,0,1,0,1,0,1); + case DESCR(0,0,1,1,0,0,0,0, 1,0,0, 0, 1,0,1): /* 16 8 8 16 16 */ + return BYTE(0,1,1,1,0,1,0,1); + case DESCR(0,0,0,0,0,0,0,0, 1,0,1, 0, 1,0,1): /* 16 16 16 16 */ + return BYTE(0,1,0,1,0,1,0,1); + + case DESCR(0,0,0,0,1,1,1,1, 0,1,0, 0, 0,0,0): /* 32 8 8 8 8 */ + return BYTE(0,0,0,1,1,1,1,1); + case DESCR(0,0,0,0,1,1,0,0, 0,1,0, 0, 0,0,1): /* 32 8 8 16 */ + return BYTE(0,0,0,1,1,1,0,1); + case DESCR(0,0,0,0,0,0,1,1, 0,1,0, 0, 1,0,0): /* 32 16 8 8 */ + return BYTE(0,0,0,1,0,1,1,1); + case DESCR(0,0,0,0,0,0,0,0, 0,1,0, 0, 1,0,1): /* 32 16 16 */ + return BYTE(0,0,0,1,0,1,0,1); + + case DESCR(1,1,1,1,0,0,0,0, 0,0,0, 0, 0,1,0): /* 8 8 8 8 32 */ + return BYTE(1,1,1,1,0,0,0,1); + case DESCR(1,1,0,0,0,0,0,0, 0,0,1, 0, 0,1,0): /* 8 8 16 32 */ + return BYTE(1,1,0,1,0,0,0,1); + case DESCR(0,0,1,1,0,0,0,0, 1,0,0, 0, 0,1,0): /* 16 8 8 32 */ + return BYTE(0,1,1,1,0,0,0,1); + case DESCR(0,0,0,0,0,0,0,0, 1,0,1, 0, 0,1,0): /* 16 16 32 */ + return BYTE(0,1,0,1,0,0,0,1); + + case DESCR(0,0,0,0,0,0,0,0, 0,1,0, 0, 0,1,0): /* 32 32 */ + return BYTE(0,0,0,1,0,0,0,1); + + case DESCR(0,0,0,0,0,0,0,0, 0,0,0, 1, 0,0,0): /* 64 */ + return BYTE(0,0,0,0,0,0,0,1); + + default: return BYTE(0,0,0,0,0,0,0,0); + /* INVALID - any valid descr produces at least one + valid bit in tree[0..7]*/ + } + /* NOTREACHED*/ + tl_assert(0); + +# undef DESCR +# undef BYTE +} + +__attribute__((unused)) +static Bool is_sane_Descr ( UShort descr ) { + return descr_to_validbits(descr) != 0; +} + +static void sprintf_Descr ( /*OUT*/HChar* dst, UShort descr ) { + VG_(sprintf)(dst, + "%d%d%d%d%d%d%d%d %d%d%d %d %d%d%d", + (Int)((descr & TREE_DESCR_8_7) ? 1 : 0), + (Int)((descr & TREE_DESCR_8_6) ? 1 : 0), + (Int)((descr & TREE_DESCR_8_5) ? 1 : 0), + (Int)((descr & TREE_DESCR_8_4) ? 1 : 0), + (Int)((descr & TREE_DESCR_8_3) ? 1 : 0), + (Int)((descr & TREE_DESCR_8_2) ? 1 : 0), + (Int)((descr & TREE_DESCR_8_1) ? 1 : 0), + (Int)((descr & TREE_DESCR_8_0) ? 1 : 0), + (Int)((descr & TREE_DESCR_16_3) ? 1 : 0), + (Int)((descr & TREE_DESCR_32_1) ? 1 : 0), + (Int)((descr & TREE_DESCR_16_2) ? 1 : 0), + (Int)((descr & TREE_DESCR_64) ? 1 : 0), + (Int)((descr & TREE_DESCR_16_1) ? 1 : 0), + (Int)((descr & TREE_DESCR_32_0) ? 1 : 0), + (Int)((descr & TREE_DESCR_16_0) ? 1 : 0) + ); +} +static void sprintf_Byte ( /*OUT*/HChar* dst, UChar byte ) { + VG_(sprintf)(dst, "%d%d%d%d%d%d%d%d", + (Int)((byte & 128) ? 1 : 0), + (Int)((byte & 64) ? 1 : 0), + (Int)((byte & 32) ? 1 : 0), + (Int)((byte & 16) ? 1 : 0), + (Int)((byte & 8) ? 1 : 0), + (Int)((byte & 4) ? 1 : 0), + (Int)((byte & 2) ? 1 : 0), + (Int)((byte & 1) ? 1 : 0) + ); +} + +static Bool is_sane_Descr_and_Tree ( UShort descr, SVal* tree ) { + Word i; + UChar validbits = descr_to_validbits(descr); + HChar buf[128], buf2[128]; + if (validbits == 0) + goto bad; + for (i = 0; i < 8; i++) { + if (validbits & (1<<i)) { + if (tree[i] == SVal_INVALID) + goto bad; + } else { + if (tree[i] != SVal_INVALID) + goto bad; + } + } + return True; + bad: + sprintf_Descr( buf, descr ); + sprintf_Byte( buf2, validbits ); + VG_(printf)("%s","is_sane_Descr_and_Tree: bad tree {\n"); + VG_(printf)(" validbits 0x%02lx %s\n", (UWord)validbits, buf2); + VG_(printf)(" descr 0x%04lx %s\n", (UWord)descr, buf); + for (i = 0; i < 8; i++) + VG_(printf)(" [%ld] 0x%016llx\n", i, tree[i]); + VG_(printf)("%s","}\n"); + return 0; +} + +static Bool is_sane_CacheLine ( CacheLine* cl ) +{ + Word tno, cloff; + + if (!cl) goto bad; + + for (tno = 0, cloff = 0; tno < N_LINE_TREES; tno++, cloff += 8) { + UShort descr = cl->descrs[tno]; + SVal* tree = &cl->svals[cloff]; + if (!is_sane_Descr_and_Tree(descr, tree)) + goto bad; + } + tl_assert(cloff == N_LINE_ARANGE); + return True; + bad: + pp_CacheLine(cl); + return False; +} + +static UShort normalise_tree ( /*MOD*/SVal* tree ) +{ + UShort descr; + /* pre: incoming tree[0..7] does not have any invalid shvals, in + particular no zeroes. */ + if (UNLIKELY(tree[7] == SVal_INVALID || tree[6] == SVal_INVALID + || tree[5] == SVal_INVALID || tree[4] == SVal_INVALID + || tree[3] == SVal_INVALID || tree[2] == SVal_INVALID + || tree[1] == SVal_INVALID || tree[0] == SVal_INVALID)) + tl_assert(0); + + descr = TREE_DESCR_8_7 | TREE_DESCR_8_6 | TREE_DESCR_8_5 + | TREE_DESCR_8_4 | TREE_DESCR_8_3 | TREE_DESCR_8_2 + | TREE_DESCR_8_1 | TREE_DESCR_8_0; + /* build 16-bit layer */ + if (tree[1] == tree[0]) { + tree[1] = SVal_INVALID; + descr &= ~(TREE_DESCR_8_1 | TREE_DESCR_8_0); + descr |= TREE_DESCR_16_0; + } + if (tree[3] == tree[2]) { + tree[3] = SVal_INVALID; + descr &= ~(TREE_DESCR_8_3 | TREE_DESCR_8_2); + descr |= TREE_DESCR_16_1; + } + if (tree[5] == tree[4]) { + tree[5] = SVal_INVALID; + descr &= ~(TREE_DESCR_8_5 | TREE_DESCR_8_4); + descr |= TREE_DESCR_16_2; + } + if (tree[7] == tree[6]) { + tree[7] = SVal_INVALID; + descr &= ~(TREE_DESCR_8_7 | TREE_DESCR_8_6); + descr |= TREE_DESCR_16_3; + } + /* build 32-bit layer */ + if (tree[2] == tree[0] + && (descr & TREE_DESCR_16_1) && (descr & TREE_DESCR_16_0)) { + tree[2] = SVal_INVALID; /* [3,1] must already be SVal_INVALID */ + descr &= ~(TREE_DESCR_16_1 | TREE_DESCR_16_0); + descr |= TREE_DESCR_32_0; + } + if (tree[6] == tree[4] + && (descr & TREE_DESCR_16_3) && (descr & TREE_DESCR_16_2)) { + tree[6] = SVal_INVALID; /* [7,5] must already be SVal_INVALID */ + descr &= ~(TREE_DESCR_16_3 | TREE_DESCR_16_2); + descr |= TREE_DESCR_32_1; + } + /* build 64-bit layer */ + if (tree[4] == tree[0] + && (descr & TREE_DESCR_32_1) && (descr & TREE_DESCR_32_0)) { + tree[4] = SVal_INVALID; /* [7,6,5,3,2,1] must already be SVal_INVALID */ + descr &= ~(TREE_DESCR_32_1 | TREE_DESCR_32_0); + descr |= TREE_DESCR_64; + } + return descr; +} + +/* This takes a cacheline where all the data is at the leaves + (w8[..]) and builds a correctly normalised tree. */ +static void normalise_CacheLine ( /*MOD*/CacheLine* cl ) +{ + Word tno, cloff; + for (tno = 0, cloff = 0; tno < N_LINE_TREES; tno++, cloff += 8) { + SVal* tree = &cl->svals[cloff]; + cl->descrs[tno] = normalise_tree( tree ); + } + tl_assert(cloff == N_LINE_ARANGE); + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + stats__cline_normalises++; +} + + +typedef struct { UChar count; SVal sval; } CountedSVal; + +static +void sequentialise_CacheLine ( /*OUT*/CountedSVal* dst, + /*OUT*/Word* dstUsedP, + Word nDst, CacheLine* src ) +{ + Word tno, cloff, dstUsed; + + tl_assert(nDst == N_LINE_ARANGE); + dstUsed = 0; + + for (tno = 0, cloff = 0; tno < N_LINE_TREES; tno++, cloff += 8) { + UShort descr = src->descrs[tno]; + SVal* tree = &src->svals[cloff]; + + /* sequentialise the tree described by (descr,tree). */ +# define PUT(_n,_v) \ + do { dst[dstUsed ].count = (_n); \ + dst[dstUsed++].sval = (_v); \ + } while (0) + + /* byte 0 */ + if (descr & TREE_DESCR_64) PUT(8, tree[0]); else + if (descr & TREE_DESCR_32_0) PUT(4, tree[0]); else + if (descr & TREE_DESCR_16_0) PUT(2, tree[0]); else + if (descr & TREE_DESCR_8_0) PUT(1, tree[0]); + /* byte 1 */ + if (descr & TREE_DESCR_8_1) PUT(1, tree[1]); + /* byte 2 */ + if (descr & TREE_DESCR_16_1) PUT(2, tree[2]); else + if (descr & TREE_DESCR_8_2) PUT(1, tree[2]); + /* byte 3 */ + if (descr & TREE_DESCR_8_3) PUT(1, tree[3]); + /* byte 4 */ + if (descr & TREE_DESCR_32_1) PUT(4, tree[4]); else + if (descr & TREE_DESCR_16_2) PUT(2, tree[4]); else + if (descr & TREE_DESCR_8_4) PUT(1, tree[4]); + /* byte 5 */ + if (descr & TREE_DESCR_8_5) PUT(1, tree[5]); + /* byte 6 */ + if (descr & TREE_DESCR_16_3) PUT(2, tree[6]); else + if (descr & TREE_DESCR_8_6) PUT(1, tree[6]); + /* byte 7 */ + if (descr & TREE_DESCR_8_7) PUT(1, tree[7]); + +# undef PUT + /* END sequentialise the tree described by (descr,tree). */ + + } + tl_assert(cloff == N_LINE_ARANGE); + tl_assert(dstUsed <= nDst); + + *dstUsedP = dstUsed; +} + +/* Write the cacheline 'wix' to backing store. Where it ends up + is determined by its tag field. */ +static __attribute__((noinline)) void cacheline_wback ( UWord wix ) +{ + Word i, j, k, m; + Addr tag; + SecMap* sm; + CacheLine* cl; + LineZ* lineZ; + LineF* lineF; + Word zix, fix, csvalsUsed; + CountedSVal csvals[N_LINE_ARANGE]; + SVal sv; + + if (0) + VG_(printf)("scache wback line %d\n", (Int)wix); + + tl_assert(wix >= 0 && wix < N_WAY_NENT); + + tag = cache_shmem.tags0[wix]; + cl = &cache_shmem.lyns0[wix]; + + /* The cache line may have been invalidated; if so, ignore it. */ + if (!is_valid_scache_tag(tag)) + return; + + /* Where are we going to put it? */ + sm = NULL; + lineZ = NULL; + lineF = NULL; + zix = fix = -1; + + /* find the Z line to write in and rcdec it or the associated F + line. */ + find_Z_for_writing( &sm, &zix, tag ); + + tl_assert(sm); + tl_assert(zix >= 0 && zix < N_SECMAP_ZLINES); + lineZ = &sm->linesZ[zix]; + + /* Generate the data to be stored */ + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + + csvalsUsed = -1; + sequentialise_CacheLine( csvals, &csvalsUsed, + N_LINE_ARANGE, cl ); + tl_assert(csvalsUsed >= 1 && csvalsUsed <= N_LINE_ARANGE); + if (0) VG_(printf)("%lu ", csvalsUsed); + + lineZ->dict[0] = lineZ->dict[1] + = lineZ->dict[2] = lineZ->dict[3] = SVal_INVALID; + + /* i indexes actual shadow values, k is cursor in csvals */ + i = 0; + for (k = 0; k < csvalsUsed; k++) { + + sv = csvals[k].sval; + if (CHECK_ZSM) + tl_assert(csvals[k].count >= 1 && csvals[k].count <= 8); + /* do we already have it? */ + if (sv == lineZ->dict[0]) { j = 0; goto dict_ok; } + if (sv == lineZ->dict[1]) { j = 1; goto dict_ok; } + if (sv == lineZ->dict[2]) { j = 2; goto dict_ok; } + if (sv == lineZ->dict[3]) { j = 3; goto dict_ok; } + /* no. look for a free slot. */ + if (CHECK_ZSM) + tl_assert(sv != SVal_INVALID); + if (lineZ->dict[0] + == SVal_INVALID) { lineZ->dict[0] = sv; j = 0; goto dict_ok; } + if (lineZ->dict[1] + == SVal_INVALID) { lineZ->dict[1] = sv; j = 1; goto dict_ok; } + if (lineZ->dict[2] + == SVal_INVALID) { lineZ->dict[2] = sv; j = 2; goto dict_ok; } + if (lineZ->dict[3] + == SVal_INVALID) { lineZ->dict[3] = sv; j = 3; goto dict_ok; } + break; /* we'll have to use the f rep */ + dict_ok: + m = csvals[k].count; + if (m == 8) { + write_twobit_array( lineZ->ix2s, i+0, j ); + write_twobit_array( lineZ->ix2s, i+1, j ); + write_twobit_array( lineZ->ix2s, i+2, j ); + write_twobit_array( lineZ->ix2s, i+3, j ); + write_twobit_array( lineZ->ix2s, i+4, j ); + write_twobit_array( lineZ->ix2s, i+5, j ); + write_twobit_array( lineZ->ix2s, i+6, j ); + write_twobit_array( lineZ->ix2s, i+7, j ); + i += 8; + } + else if (m == 4) { + write_twobit_array( lineZ->ix2s, i+0, j ); + write_twobit_array( lineZ->ix2s, i+1, j ); + write_twobit_array( lineZ->ix2s, i+2, j ); + write_twobit_array( lineZ->ix2s, i+3, j ); + i += 4; + } + else if (m == 1) { + write_twobit_array( lineZ->ix2s, i+0, j ); + i += 1; + } + else if (m == 2) { + write_twobit_array( lineZ->ix2s, i+0, j ); + write_twobit_array( lineZ->ix2s, i+1, j ); + i += 2; + } + else { + tl_assert(0); /* 8 4 2 or 1 are the only legitimate values for m */ + } + + } + + if (LIKELY(i == N_LINE_ARANGE)) { + /* Construction of the compressed representation was + successful. */ + rcinc_LineZ(lineZ); + stats__cache_Z_wbacks++; + } else { + /* Cannot use the compressed(z) representation. Use the full(f) + rep instead. */ + tl_assert(i >= 0 && i < N_LINE_ARANGE); + alloc_F_for_writing( sm, &fix ); + tl_assert(sm->linesF); + tl_assert(sm->linesF_size > 0); + tl_assert(fix >= 0 && fix < (Word)sm->linesF_size); + lineF = &sm->linesF[fix]; + tl_assert(!lineF->inUse); + lineZ->dict[0] = lineZ->dict[2] = lineZ->dict[3] = SVal_INVALID; + lineZ->dict[1] = (SVal)fix; + lineF->inUse = True; + i = 0; + for (k = 0; k < csvalsUsed; k++) { + if (CHECK_ZSM) + tl_assert(csvals[k].count >= 1 && csvals[k].count <= 8); + sv = csvals[k].sval; + if (CHECK_ZSM) + tl_assert(sv != SVal_INVALID); + for (m = csvals[k].count; m > 0; m--) { + lineF->w64s[i] = sv; + i++; + } + } + tl_assert(i == N_LINE_ARANGE); + rcinc_LineF(lineF); + stats__cache_F_wbacks++; + } +} + +/* Fetch the cacheline 'wix' from the backing store. The tag + associated with 'wix' is assumed to have already been filled in; + hence that is used to determine where in the backing store to read + from. */ +static __attribute__((noinline)) void cacheline_fetch ( UWord wix ) +{ + Word i; + Addr tag; + CacheLine* cl; + LineZ* lineZ; + LineF* lineF; + + if (0) + VG_(printf)("scache fetch line %d\n", (Int)wix); + + tl_assert(wix >= 0 && wix < N_WAY_NENT); + + tag = cache_shmem.tags0[wix]; + cl = &cache_shmem.lyns0[wix]; + + /* reject nonsense requests */ + tl_assert(is_valid_scache_tag(tag)); + + lineZ = NULL; + lineF = NULL; + find_ZF_for_reading( &lineZ, &lineF, tag ); + tl_assert( (lineZ && !lineF) || (!lineZ && lineF) ); + + /* expand the data into the bottom layer of the tree, then get + cacheline_normalise to build the descriptor array. */ + if (lineF) { + tl_assert(lineF->inUse); + for (i = 0; i < N_LINE_ARANGE; i++) { + cl->svals[i] = lineF->w64s[i]; + } + stats__cache_F_fetches++; + } else { + for (i = 0; i < N_LINE_ARANGE; i++) { + SVal sv; + UWord ix = read_twobit_array( lineZ->ix2s, i ); + /* correct, but expensive: tl_assert(ix >= 0 && ix <= 3); */ + sv = lineZ->dict[ix]; + tl_assert(sv != SVal_INVALID); + cl->svals[i] = sv; + } + stats__cache_Z_fetches++; + } + normalise_CacheLine( cl ); +} + +static void shmem__invalidate_scache ( void ) { + Word wix; + if (0) VG_(printf)("%s","scache inval\n"); + tl_assert(!is_valid_scache_tag(1)); + for (wix = 0; wix < N_WAY_NENT; wix++) { + cache_shmem.tags0[wix] = 1/*INVALID*/; + } + stats__cache_invals++; +} + +static void shmem__flush_and_invalidate_scache ( void ) { + Word wix; + Addr tag; + if (0) VG_(printf)("%s","scache flush and invalidate\n"); + tl_assert(!is_valid_scache_tag(1)); + for (wix = 0; wix < N_WAY_NENT; wix++) { + tag = cache_shmem.tags0[wix]; + if (tag == 1/*INVALID*/) { + /* already invalid; nothing to do */ + } else { + tl_assert(is_valid_scache_tag(tag)); + cacheline_wback( wix ); + } + cache_shmem.tags0[wix] = 1/*INVALID*/; + } + stats__cache_flushes++; + stats__cache_invals++; +} + + +static inline Bool aligned16 ( Addr a ) { + return 0 == (a & 1); +} +static inline Bool aligned32 ( Addr a ) { + return 0 == (a & 3); +} +static inline Bool aligned64 ( Addr a ) { + return 0 == (a & 7); +} +static inline UWord get_cacheline_offset ( Addr a ) { + return (UWord)(a & (N_LINE_ARANGE - 1)); +} +static inline Addr cacheline_ROUNDUP ( Addr a ) { + return ROUNDUP(a, N_LINE_ARANGE); +} +static inline Addr cacheline_ROUNDDN ( Addr a ) { + return ROUNDDN(a, N_LINE_ARANGE); +} +static inline UWord get_treeno ( Addr a ) { + return get_cacheline_offset(a) >> 3; +} +static inline UWord get_tree_offset ( Addr a ) { + return a & 7; +} + +static __attribute__((noinline)) + CacheLine* get_cacheline_MISS ( Addr a ); /* fwds */ +static inline CacheLine* get_cacheline ( Addr a ) +{ + /* tag is 'a' with the in-line offset masked out, + eg a[31]..a[4] 0000 */ + Addr tag = a & ~(N_LINE_ARANGE - 1); + UWord wix = (a >> N_LINE_BITS) & (N_WAY_NENT - 1); + stats__cache_totrefs++; + if (LIKELY(tag == cache_shmem.tags0[wix])) { + return &cache_shmem.lyns0[wix]; + } else { + return get_cacheline_MISS( a ); + } +} + +static __attribute__((noinline)) + CacheLine* get_cacheline_MISS ( Addr a ) +{ + /* tag is 'a' with the in-line offset masked out, + eg a[31]..a[4] 0000 */ + + CacheLine* cl; + Addr* tag_old_p; + Addr tag = a & ~(N_LINE_ARANGE - 1); + UWord wix = (a >> N_LINE_BITS) & (N_WAY_NENT - 1); + + tl_assert(tag != cache_shmem.tags0[wix]); + + /* Dump the old line into the backing store. */ + stats__cache_totmisses++; + + cl = &cache_shmem.lyns0[wix]; + tag_old_p = &cache_shmem.tags0[wix]; + + if (is_valid_scache_tag( *tag_old_p )) { + /* EXPENSIVE and REDUNDANT: callee does it */ + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + cacheline_wback( wix ); + } + /* and reload the new one */ + *tag_old_p = tag; + cacheline_fetch( wix ); + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + return cl; +} + +static UShort pulldown_to_32 ( /*MOD*/SVal* tree, UWord toff, UShort descr ) { + stats__cline_64to32pulldown++; + switch (toff) { + case 0: case 4: + tl_assert(descr & TREE_DESCR_64); + tree[4] = tree[0]; + descr &= ~TREE_DESCR_64; + descr |= (TREE_DESCR_32_1 | TREE_DESCR_32_0); + break; + default: + tl_assert(0); + } + return descr; +} + +static UShort pulldown_to_16 ( /*MOD*/SVal* tree, UWord toff, UShort descr ) { + stats__cline_32to16pulldown++; + switch (toff) { + case 0: case 2: + if (!(descr & TREE_DESCR_32_0)) { + descr = pulldown_to_32(tree, 0, descr); + } + tl_assert(descr & TREE_DESCR_32_0); + tree[2] = tree[0]; + descr &= ~TREE_DESCR_32_0; + descr |= (TREE_DESCR_16_1 | TREE_DESCR_16_0); + break; + case 4: case 6: + if (!(descr & TREE_DESCR_32_1)) { + descr = pulldown_to_32(tree, 4, descr); + } + tl_assert(descr & TREE_DESCR_32_1); + tree[6] = tree[4]; + descr &= ~TREE_DESCR_32_1; + descr |= (TREE_DESCR_16_3 | TREE_DESCR_16_2); + break; + default: + tl_assert(0); + } + return descr; +} + +static UShort pulldown_to_8 ( /*MOD*/SVal* tree, UWord toff, UShort descr ) { + stats__cline_16to8pulldown++; + switch (toff) { + case 0: case 1: + if (!(descr & TREE_DESCR_16_0)) { + descr = pulldown_to_16(tree, 0, descr); + } + tl_assert(descr & TREE_DESCR_16_0); + tree[1] = tree[0]; + descr &= ~TREE_DESCR_16_0; + descr |= (TREE_DESCR_8_1 | TREE_DESCR_8_0); + break; + case 2: case 3: + if (!(descr & TREE_DESCR_16_1)) { + descr = pulldown_to_16(tree, 2, descr); + } + tl_assert(descr & TREE_DESCR_16_1); + tree[3] = tree[2]; + descr &= ~TREE_DESCR_16_1; + descr |= (TREE_DESCR_8_3 | TREE_DESCR_8_2); + break; + case 4: case 5: + if (!(descr & TREE_DESCR_16_2)) { + descr = pulldown_to_16(tree, 4, descr); + } + tl_assert(descr & TREE_DESCR_16_2); + tree[5] = tree[4]; + descr &= ~TREE_DESCR_16_2; + descr |= (TREE_DESCR_8_5 | TREE_DESCR_8_4); + break; + case 6: case 7: + if (!(descr & TREE_DESCR_16_3)) { + descr = pulldown_to_16(tree, 6, descr); + } + tl_assert(descr & TREE_DESCR_16_3); + tree[7] = tree[6]; + descr &= ~TREE_DESCR_16_3; + descr |= (TREE_DESCR_8_7 | TREE_DESCR_8_6); + break; + default: + tl_assert(0); + } + return descr; +} + + +static UShort pullup_descr_to_16 ( UShort descr, UWord toff ) { + UShort mask; + switch (toff) { + case 0: + mask = TREE_DESCR_8_1 | TREE_DESCR_8_0; + tl_assert( (descr & mask) == mask ); + descr &= ~mask; + descr |= TREE_DESCR_16_0; + break; + case 2: + mask = TREE_DESCR_8_3 | TREE_DESCR_8_2; + tl_assert( (descr & mask) == mask ); + descr &= ~mask; + descr |= TREE_DESCR_16_1; + break; + case 4: + mask = TREE_DESCR_8_5 | TREE_DESCR_8_4; + tl_assert( (descr & mask) == mask ); + descr &= ~mask; + descr |= TREE_DESCR_16_2; + break; + case 6: + mask = TREE_DESCR_8_7 | TREE_DESCR_8_6; + tl_assert( (descr & mask) == mask ); + descr &= ~mask; + descr |= TREE_DESCR_16_3; + break; + default: + tl_assert(0); + } + return descr; +} + +static UShort pullup_descr_to_32 ( UShort descr, UWord toff ) { + UShort mask; + switch (toff) { + case 0: + if (!(descr & TREE_DESCR_16_0)) + descr = pullup_descr_to_16(descr, 0); + if (!(descr & TREE_DESCR_16_1)) + descr = pullup_descr_to_16(descr, 2); + mask = TREE_DESCR_16_1 | TREE_DESCR_16_0; + tl_assert( (descr & mask) == mask ); + descr &= ~mask; + descr |= TREE_DESCR_32_0; + break; + case 4: + if (!(descr & TREE_DESCR_16_2)) + descr = pullup_descr_to_16(descr, 4); + if (!(descr & TREE_DESCR_16_3)) + descr = pullup_descr_to_16(descr, 6); + mask = TREE_DESCR_16_3 | TREE_DESCR_16_2; + tl_assert( (descr & mask) == mask ); + descr &= ~mask; + descr |= TREE_DESCR_32_1; + break; + default: + tl_assert(0); + } + return descr; +} + +static Bool valid_value_is_above_me_32 ( UShort descr, UWord toff ) { + switch (toff) { + case 0: case 4: + return 0 != (descr & TREE_DESCR_64); + default: + tl_assert(0); + } +} + +static Bool valid_value_is_below_me_16 ( UShort descr, UWord toff ) { + switch (toff) { + case 0: + return 0 != (descr & (TREE_DESCR_8_1 | TREE_DESCR_8_0)); + case 2: + return 0 != (descr & (TREE_DESCR_8_3 | TREE_DESCR_8_2)); + case 4: + return 0 != (descr & (TREE_DESCR_8_5 | TREE_DESCR_8_4)); + case 6: + return 0 != (descr & (TREE_DESCR_8_7 | TREE_DESCR_8_6)); + default: + tl_assert(0); + } +} + +/* ------------ Cache management ------------ */ + +static void zsm_flush_cache ( void ) +{ + shmem__flush_and_invalidate_scache(); +} + + +static void zsm_init ( void(*p_rcinc)(SVal), void(*p_rcdec)(SVal) ) +{ + tl_assert( sizeof(UWord) == sizeof(Addr) ); + + rcinc = p_rcinc; + rcdec = p_rcdec; + + tl_assert(map_shmem == NULL); + map_shmem = VG_(newFM)( HG_(zalloc), "libhb.zsm_init.1 (map_shmem)", + HG_(free), + NULL/*unboxed UWord cmp*/); + tl_assert(map_shmem != NULL); + shmem__invalidate_scache(); + + /* a SecMap must contain an integral number of CacheLines */ + tl_assert(0 == (N_SECMAP_ARANGE % N_LINE_ARANGE)); + /* also ... a CacheLine holds an integral number of trees */ + tl_assert(0 == (N_LINE_ARANGE % 8)); +} + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// SECTION END compressed shadow memory // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + + + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// SECTION BEGIN vts primitives // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + +#ifndef __HB_VTS_H +#define __HB_VTS_H + +/* VtsIDs can't exceed 30 bits, since they have to be packed into the + lowest 30 bits of an SVal. */ +typedef UInt VtsID; +#define VtsID_INVALID 0xFFFFFFFF + +/* A VTS contains .ts, its vector clock, and also .id, a field to hold + a backlink for the caller's convenience. Since we have no idea + what to set that to in the library, it always gets set to + VtsID_INVALID. */ +typedef + struct { + VtsID id; + XArray* ts; /* XArray* ScalarTS(abstract) */ + } + VTS; + + +/* Create a new, empty VTS. */ +VTS* VTS__new ( void ); + +/* Delete this VTS in its entirety. */ +void VTS__delete ( VTS* vts ); + +/* Create a new singleton VTS. */ +VTS* VTS__singleton ( Thr* thr, ULong tym ); + +/* Return a new VTS in which vts[me]++, so to speak. 'vts' itself is + not modified. */ +VTS* VTS__tick ( Thr* me, VTS* vts ); + +/* Return a new VTS constructed as the join (max) of the 2 args. + Neither arg is modified. */ +VTS* VTS__join ( VTS* a, VTS* b ); + +/* Compute the partial ordering relation of the two args. */ +typedef + enum { POrd_EQ=4, POrd_LT, POrd_GT, POrd_UN } + POrd; + +POrd VTS__cmp ( VTS* a, VTS* b ); + +/* Compute an arbitrary structural (total) ordering on the two args, + based on their VCs, so they can be looked up in a table, tree, etc. + Returns -1, 0 or 1. */ +Word VTS__cmp_structural ( VTS* a, VTS* b ); + +/* Debugging only. Display the given VTS in the buffer. */ +void VTS__show ( HChar* buf, Int nBuf, VTS* vts ); + +/* Debugging only. Return vts[index], so to speak. */ +ULong VTS__indexAt_SLOW ( VTS* vts, Thr* idx ); + +#endif /* ! __HB_VTS_H */ + + +/*--------------- to do with Vector Timestamps ---------------*/ + +/* Scalar Timestamp */ +typedef + struct { + Thr* thr; + ULong tym; + } + ScalarTS; + + +static Bool is_sane_VTS ( VTS* vts ) +{ + UWord i, n; + ScalarTS *st1, *st2; + if (!vts) return False; + if (!vts->ts) return False; + n = VG_(sizeXA)( vts->ts ); + if (n >= 2) { + for (i = 0; i < n-1; i++) { + st1 = VG_(indexXA)( vts->ts, i ); + st2 = VG_(indexXA)( vts->ts, i+1 ); + if (st1->thr >= st2->thr) + return False; + if (st1->tym == 0 || st2->tym == 0) + return False; + } + } + return True; +} + + +/* Create a new, empty VTS. +*/ +VTS* VTS__new ( void ) +{ + VTS* vts; + vts = HG_(zalloc)( "libhb.VTS__new.1", sizeof(VTS) ); + tl_assert(vts); + vts->id = VtsID_INVALID; + vts->ts = VG_(newXA)( HG_(zalloc), "libhb.VTS__new.2", + HG_(free), sizeof(ScalarTS) ); + tl_assert(vts->ts); + return vts; +} + + +/* Delete this VTS in its entirety. +*/ +void VTS__delete ( VTS* vts ) +{ + tl_assert(vts); + tl_assert(vts->ts); + VG_(deleteXA)( vts->ts ); + HG_(free)(vts); +} + + +/* Create a new singleton VTS. +*/ +VTS* VTS__singleton ( Thr* thr, ULong tym ) { + ScalarTS st; + VTS* vts; + tl_assert(thr); + tl_assert(tym >= 1); + vts = VTS__new(); + st.thr = thr; + st.tym = tym; + VG_(addToXA)( vts->ts, &st ); + return vts; +} + + +/* Return a new VTS in which vts[me]++, so to speak. 'vts' itself is + not modified. +*/ +VTS* VTS__tick ( Thr* me, VTS* vts ) +{ + ScalarTS* here = NULL; + ScalarTS tmp; + VTS* res; + Word i, n; + tl_assert(me); + tl_assert(is_sane_VTS(vts)); + //if (0) VG_(printf)("tick vts thrno %ld szin %d\n", + // (Word)me->errmsg_index, (Int)VG_(sizeXA)(vts) ); + res = VTS__new(); + n = VG_(sizeXA)( vts->ts ); + + /* main loop doesn't handle zero-entry case correctly, so + special-case it. */ + if (n == 0) { + tmp.thr = me; + tmp.tym = 1; + VG_(addToXA)( res->ts, &tmp ); + tl_assert(is_sane_VTS(res)); + return res; + } + + for (i = 0; i < n; i++) { + here = VG_(indexXA)( vts->ts, i ); + if (me < here->thr) { + /* We just went past 'me', without seeing it. */ + tmp.thr = me; + tmp.tym = 1; + VG_(addToXA)( res->ts, &tmp ); + tmp = *here; + VG_(addToXA)( res->ts, &tmp ); + i++; + break; + } + else if (me == here->thr) { + tmp = *here; + tmp.tym++; + VG_(addToXA)( res->ts, &tmp ); + i++; + break; + } + else /* me > here->thr */ { + tmp = *here; + VG_(addToXA)( res->ts, &tmp ); + } + } + tl_assert(i >= 0 && i <= n); + if (i == n && here && here->thr < me) { + tmp.thr = me; + tmp.tym = 1; + VG_(addToXA)( res->ts, &tmp ); + } else { + for (/*keepgoing*/; i < n; i++) { + here = VG_(indexXA)( vts->ts, i ); + tmp = *here; + VG_(addToXA)( res->ts, &tmp ); + } + } + tl_assert(is_sane_VTS(res)); + //if (0) VG_(printf)("tick vts thrno %ld szou %d\n", + // (Word)me->errmsg_index, (Int)VG_(sizeXA)(res) ); + return res; +} + + +/* Return a new VTS constructed as the join (max) of the 2 args. + Neither arg is modified. +*/ +VTS* VTS__join ( VTS* a, VTS* b ) +{ + Word ia, ib, useda, usedb; + ULong tyma, tymb, tymMax; + Thr* thr; + VTS* res; + + tl_assert(a && a->ts); + tl_assert(b && b->ts); + useda = VG_(sizeXA)( a->ts ); + usedb = VG_(sizeXA)( b->ts ); + + res = VTS__new(); + ia = ib = 0; + + while (1) { + + /* This logic is to enumerate triples (thr, tyma, tymb) drawn + from a and b in order, where thr is the next Thr* + occurring in either a or b, and tyma/b are the relevant + scalar timestamps, taking into account implicit zeroes. */ + tl_assert(ia >= 0 && ia <= useda); + tl_assert(ib >= 0 && ib <= usedb); + + if (ia == useda && ib == usedb) { + /* both empty - done */ + break; + + } else if (ia == useda && ib != usedb) { + /* a empty, use up b */ + ScalarTS* tmpb = VG_(indexXA)( b->ts, ib ); + thr = tmpb->thr; + tyma = 0; + tymb = tmpb->tym; + ib++; + + } else if (ia != useda && ib == usedb) { + /* b empty, use up a */ + ScalarTS* tmpa = VG_(indexXA)( a->ts, ia ); + thr = tmpa->thr; + tyma = tmpa->tym; + tymb = 0; + ia++; + + } else { + /* both not empty; extract lowest-Thr*'d triple */ + ScalarTS* tmpa = VG_(indexXA)( a->ts, ia ); + ScalarTS* tmpb = VG_(indexXA)( b->ts, ib ); + if (tmpa->thr < tmpb->thr) { + /* a has the lowest unconsidered Thr* */ + thr = tmpa->thr; + tyma = tmpa->tym; + tymb = 0; + ia++; + } else if (tmpa->thr > tmpb->thr) { + /* b has the lowest unconsidered Thr* */ + thr = tmpb->thr; + tyma = 0; + tymb = tmpb->tym; + ib++; + } else { + /* they both next mention the same Thr* */ + tl_assert(tmpa->thr == tmpb->thr); + thr = tmpa->thr; /* == tmpb->thr */ + tyma = tmpa->tym; + tymb = tmpb->tym; + ia++; + ib++; + } + } + + /* having laboriously determined (thr, tyma, tymb), do something + useful with it. */ + tymMax = tyma > tymb ? tyma : tymb; + if (tymMax > 0) { + ScalarTS st; + st.thr = thr; + st.tym = tymMax; + VG_(addToXA)( res->ts, &st ); + } + + } + + tl_assert(is_sane_VTS( res )); + + return res; +} + + +/* Compute the partial ordering relation of the two args. +*/ +POrd VTS__cmp ( VTS* a, VTS* b ) +{ + Word ia, ib, useda, usedb; + ULong tyma, tymb; + + Bool all_leq = True; + Bool all_geq = True; + + tl_assert(a && a->ts); + tl_assert(b && b->ts); + useda = VG_(sizeXA)( a->ts ); + usedb = VG_(sizeXA)( b->ts ); + + ia = ib = 0; + + while (1) { + + /* This logic is to enumerate doubles (tyma, tymb) drawn + from a and b in order, and tyma/b are the relevant + scalar timestamps, taking into account implicit zeroes. */ + tl_assert(ia >= 0 && ia <= useda); + tl_assert(ib >= 0 && ib <= usedb); + + if (ia == useda && ib == usedb) { + /* both empty - done */ + break; + + } else if (ia == useda && ib != usedb) { + /* a empty, use up b */ + ScalarTS* tmpb = VG_(indexXA)( b->ts, ib ); + tyma = 0; + tymb = tmpb->tym; + ib++; + + } else if (ia != useda && ib == usedb) { + /* b empty, use up a */ + ScalarTS* tmpa = VG_(indexXA)( a->ts, ia ); + tyma = tmpa->tym; + tymb = 0; + ia++; + + } else { + /* both not empty; extract lowest-Thr*'d triple */ + ScalarTS* tmpa = VG_(indexXA)( a->ts, ia ); + ScalarTS* tmpb = VG_(indexXA)( b->ts, ib ); + if (tmpa->thr < tmpb->thr) { + /* a has the lowest unconsidered Thr* */ + tyma = tmpa->tym; + tymb = 0; + ia++; + } + else + if (tmpa->thr > tmpb->thr) { + /* b has the lowest unconsidered Thr* */ + tyma = 0; + tymb = tmpb->tym; + ib++; + } else { + /* they both next mention the same Thr* */ + tl_assert(tmpa->thr == tmpb->thr); + tyma = tmpa->tym; + tymb = tmpb->tym; + ia++; + ib++; + } + } + + /* having laboriously determined (tyma, tymb), do something + useful with it. */ + if (tyma < tymb) + all_geq = False; + if (tyma > tymb) + all_leq = False; + } + + if (all_leq && all_geq) + return POrd_EQ; + /* now we know they aren't equal, so either all_leq or all_geq or + both are false. */ + if (all_leq) + return POrd_LT; + if (all_geq) + return POrd_GT; + /* hmm, neither all_geq or all_leq. This means unordered. */ + return POrd_UN; +} + + +/* Compute an arbitrary structural (total) ordering on the two args, + based on their VCs, so they can be looked up in a table, tree, etc. + Returns -1, 0 or 1. (really just 'deriving Ord' :-) +*/ +Word VTS__cmp_structural ( VTS* a, VTS* b ) +{ + /* We just need to generate an arbitrary total ordering based on + a->ts and b->ts. Preferably do it in a way which comes across likely + differences relatively quickly. */ + Word i, useda, usedb; + ScalarTS *tmpa, *tmpb; + + tl_assert(a && a->ts); + tl_assert(b && b->ts); + useda = VG_(sizeXA)( a->ts ); + usedb = VG_(sizeXA)( b->ts ); + + if (useda < usedb) return -1; + if (useda > usedb) return 1; + + /* Same length vectors, so let's step through them together. */ + tl_assert(useda == usedb); + for (i = 0; i < useda; i++) { + tmpa = VG_(indexXA)( a->ts, i ); + tmpb = VG_(indexXA)( b->ts, i ); + if (tmpa->tym < tmpb->tym) return -1; + if (tmpa->tym > tmpb->tym) return 1; + if (tmpa->thr < tmpb->thr) return -1; + if (tmpa->thr > tmpb->thr) return 1; + } + + /* They're identical. */ + return 0; +} + + +/* Debugging only. Display the given VTS in the buffer. +*/ +void VTS__show ( HChar* buf, Int nBuf, VTS* vts ) { + ScalarTS* st; + HChar unit[64]; + Word i, n; + Int avail = nBuf; + tl_assert(vts && vts->ts); + tl_assert(nBuf > 16); + buf[0] = '['; + buf[1] = 0; + n = VG_(sizeXA)( vts->ts ); + for (i = 0; i < n; i++) { + tl_assert(avail >= 40); + st = VG_(indexXA)( vts->ts, i ); + VG_(memset)(unit, 0, sizeof(unit)); + VG_(sprintf)(unit, i < n-1 ? "%p:%lld " : "%p:%lld", + st->thr, st->tym); + if (avail < VG_(strlen)(unit) + 40/*let's say*/) { + VG_(strcat)(buf, " ...]"); + buf[nBuf-1] = 0; + return; + } + VG_(strcat)(buf, unit); + avail -= VG_(strlen)(unit); + } + VG_(strcat)(buf, "]"); + buf[nBuf-1] = 0; +} + + +/* Debugging only. Return vts[index], so to speak. +*/ +ULong VTS__indexAt_SLOW ( VTS* vts, Thr* idx ) { + UWord i, n; + tl_assert(vts && vts->ts); + n = VG_(sizeXA)( vts->ts ); + for (i = 0; i < n; i++) { + ScalarTS* st = VG_(indexXA)( vts->ts, i ); + if (st->thr == idx) + return st->tym; + } + return 0; +} + + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// SECTION END vts primitives // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + + + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// SECTION BEGIN main library // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////// +// // +// VTS set // +// // +///////////////////////////////////////////////////////// + +static WordFM* /* VTS* void void */ vts_set = NULL; + +static void vts_set_init ( void ) +{ + tl_assert(!vts_set); + vts_set = VG_(newFM)( HG_(zalloc), "libhb.vts_set_init.1", + HG_(free), + (Word(*)(UWord,UWord))VTS__cmp_structural ); + tl_assert(vts_set); +} + +/* Given a newly made VTS, look in vts_set to see if we already have + an identical one. If yes, free up this one and return instead a + pointer to the existing one. If no, add this one to the set and + return the same pointer. Caller differentiates the two cases by + comparing returned pointer with the supplied one (although that + does require that the supplied VTS is not already in the set). +*/ +static VTS* vts_set__find_and_dealloc__or_add ( VTS* cand ) +{ + UWord keyW, valW; + /* lookup cand (by value) */ + if (VG_(lookupFM)( vts_set, &keyW, &valW, (UWord)cand )) { + /* found it */ + tl_assert(valW == 0); + /* if this fails, cand (by ref) was already present (!) */ + tl_assert(keyW != (UWord)cand); + VTS__delete(cand); + return (VTS*)keyW; + } else { + /* not present. Add and return pointer to same. */ + VG_(addToFM)( vts_set, (UWord)cand, 0/*val is unused*/ ); + return cand; + } +} + + +///////////////////////////////////////////////////////// +// // +// VTS table // +// // +///////////////////////////////////////////////////////// + +static void VtsID__invalidate_caches ( void ); /* fwds */ + +/* A type to hold VTS table entries. Invariants: + If .vts == NULL, then this entry is not in use, so: + - .rc == 0 + - this entry is on the freelist (unfortunately, does not imply + any constraints on value for .nextfree) + If .vts != NULL, then this entry is in use: + - .vts is findable in vts_set + - .vts->id == this entry number + - no specific value for .rc (even 0 is OK) + - this entry is not on freelist, so .nextfree == VtsID_INVALID +*/ +typedef + struct { + VTS* vts; /* vts, in vts_set */ + UWord rc; /* reference count - enough for entire aspace */ + VtsID freelink; /* chain for free entries, VtsID_INVALID at end */ + } + VtsTE; + +/* The VTS table. */ +static XArray* /* of VtsTE */ vts_tab = NULL; + +/* An index into the VTS table, indicating the start of the list of + free (available for use) entries. If the list is empty, this is + VtsID_INVALID. */ +static VtsID vts_tab_freelist = VtsID_INVALID; + +/* Do a GC of vts_tab when the freelist becomes empty AND the size of + vts_tab equals or exceeds this size. After GC, the value here is + set appropriately so as to check for the next GC point. */ +static Word vts_next_GC_at = 1000; + +static void vts_tab_init ( void ) +{ + vts_tab + = VG_(newXA)( HG_(zalloc), "libhb.vts_tab_init.1", + HG_(free), sizeof(VtsTE) ); + vts_tab_freelist + = VtsID_INVALID; + tl_assert(vts_tab); +} + +/* Add ii to the free list, checking that it looks out-of-use. */ +static void add_to_free_list ( VtsID ii ) +{ + VtsTE* ie = VG_(indexXA)( vts_tab, ii ); + tl_assert(ie->vts == NULL); + tl_assert(ie->rc == 0); + tl_assert(ie->freelink == VtsID_INVALID); + ie->freelink = vts_tab_freelist; + vts_tab_freelist = ii; +} + +/* Get an entry from the free list. This will return VtsID_INVALID if + the free list is empty. */ +static VtsID get_from_free_list ( void ) +{ + VtsID ii; + VtsTE* ie; + if (vts_tab_freelist == VtsID_INVALID) + return VtsID_INVALID; + ii = vts_tab_freelist; + ie = VG_(indexXA)( vts_tab, ii ); + tl_assert(ie->vts == NULL); + tl_assert(ie->rc == 0); + vts_tab_freelist = ie->freelink; + return ii; +} + +/* Produce a new VtsID that can be used, either by getting it from + the freelist, or, if that is empty, by expanding vts_tab. */ +static VtsID get_new_VtsID ( void ) +{ + VtsID ii; + VtsTE te; + ii = get_from_free_list(); + if (ii != VtsID_INVALID) + return ii; + te.vts = NULL; + te.rc = 0; + te.freelink = VtsID_INVALID; + ii = (VtsID)VG_(addToXA)( vts_tab, &te ); + return ii; +} + + +/* Indirect callback from lib_zsm. */ +static void VtsID__rcinc ( VtsID ii ) +{ + VtsTE* ie; + /* VG_(indexXA) does a range check for us */ + ie = VG_(indexXA)( vts_tab, ii ); + tl_assert(ie->vts); /* else it's not in use */ + tl_assert(ie->rc < ~0UL); /* else we can't continue */ + tl_assert(ie->vts->id == ii); + ie->rc++; +} + +/* Indirect callback from lib_zsm. */ +static void VtsID__rcdec ( VtsID ii ) +{ + VtsTE* ie; + /* VG_(indexXA) does a range check for us */ + ie = VG_(indexXA)( vts_tab, ii ); + tl_assert(ie->vts); /* else it's not in use */ + tl_assert(ie->rc > 0); /* else RC snafu */ + tl_assert(ie->vts->id == ii); + ie->rc--; +} + + +/* Look up 'cand' in our collection of VTSs. If present, deallocate + it and return the VtsID for the pre-existing version. If not + present, add it to both vts_tab and vts_set, allocate a fresh VtsID + for it, and return that. */ +static VtsID vts_tab__find_and_dealloc__or_add ( VTS* cand ) +{ + VTS* auld; + tl_assert(cand->id == VtsID_INVALID); + auld = vts_set__find_and_dealloc__or_add(cand); + if (auld != cand) { + /* We already have an Aulde one. Use that. */ + VtsTE* ie; + tl_assert(auld->id != VtsID_INVALID); + ie = VG_(indexXA)( vts_tab, auld->id ); + tl_assert(ie->vts == auld); + return auld->id; + } else { + VtsID ii = get_new_VtsID(); + VtsTE* ie = VG_(indexXA)( vts_tab, ii ); + ie->vts = cand; + ie->rc = 0; + ie->freelink = VtsID_INVALID; + cand->id = ii; + return ii; + } +} + + +static void show_vts_stats ( HChar* caller ) +{ + UWord nSet, nTab, nLive; + ULong totrc; + UWord n, i; + nSet = VG_(sizeFM)( vts_set ); + nTab = VG_(sizeXA)( vts_tab ); + totrc = 0; + nLive = 0; + n = VG_(sizeXA)( vts_tab ); + for (i = 0; i < n; i++) { + VtsTE* ie = VG_(indexXA)( vts_tab, i ); + if (ie->vts) { + nLive++; + totrc += (ULong)ie->rc; + } else { + tl_assert(ie->rc == 0); + } + } + VG_(printf)(" show_vts_stats %s\n", caller); + VG_(printf)(" vts_tab size %4lu\n", nTab); + VG_(printf)(" vts_tab live %4lu\n", nLive); + VG_(printf)(" vts_set size %4lu\n", nSet); + VG_(printf)(" total rc %4llu\n", totrc); +} + +/* NOT TO BE CALLED FROM WITHIN libzsm. */ +__attribute__((noinline)) +static void vts_tab__do_GC ( Bool show_stats ) +{ + UWord i, nTab, nLive, nFreed; + + /* check this is actually necessary. */ + tl_assert(vts_tab_freelist == VtsID_INVALID); + + /* empty the caches for partial order checks and binary joins. We + could do better and prune out the entries to be deleted, but it + ain't worth the hassle. */ + VtsID__invalidate_caches(); + + /* First, make the reference counts up to date. */ + zsm_flush_cache(); + + nTab = VG_(sizeXA)( vts_tab ); + + if (show_stats) { + VG_(printf)("<<GC begins at vts_tab size %lu>>\n", nTab); + show_vts_stats("before GC"); + } + + /* Now we can inspect the entire vts_tab. Any entries + with zero .rc fields are now no longer in use and can be + free list, removed from vts_set, and deleted. */ + nFreed = 0; + for (i = 0; i < nTab; i++) { + Bool present; + UWord oldK = 0, oldV = 0; + VtsTE* te = VG_(indexXA)( vts_tab, i ); + if (te->vts == NULL) { + tl_assert(te->rc == 0); + continue; /* already on the free list (presumably) */ + } + if (te->rc > 0) + continue; /* in use */ + /* Ok, we got one we can free. */ + tl_assert(te->vts->id == i); + /* first, remove it from vts_set. */ + present = VG_(delFromFM)( vts_set, + &oldK, &oldV, (UWord)te->vts ); + tl_assert(present); /* else it isn't in vts_set ?! */ + tl_assert(oldV == 0); /* no info stored in vts_set val fields */ + tl_assert(oldK == (UWord)te->vts); /* else what did delFromFM find?! */ + /* now free the VTS itself */ + VTS__delete(te->vts); + te->vts = NULL; + /* and finally put this entry on the free list */ + tl_assert(te->freelink == VtsID_INVALID); /* can't already be on it */ + add_to_free_list( i ); + nFreed++; + } + + /* Now figure out when the next GC should be. We'll allow the + number of VTSs to double before GCing again. Except of course + that since we can't (or, at least, don't) shrink vts_tab, we + can't set the threshhold value smaller than it. */ + tl_assert(nFreed <= nTab); + nLive = nTab - nFreed; + tl_assert(nLive >= 0 && nLive <= nTab); + vts_next_GC_at = 2 * nLive; + if (vts_next_GC_at < nTab) + vts_next_GC_at = nTab; + + if (show_stats) { + show_vts_stats("after GC"); + VG_(printf)("<<GC ends, next gc at %ld>>\n", vts_next_GC_at); + } + + if (VG_(clo_verbosity) > 1) { + static UInt ctr = 0; + tl_assert(nTab > 0); + VG_(message)(Vg_DebugMsg, + "libhb: VTS GC: #%u old size %lu live %lu (%2llu%%)", + ctr++, nTab, nLive, (100ULL * (ULong)nLive) / (ULong)nTab); + } +} + + +///////////////////////////////////////////////////////// +// // +// Vts IDs // +// // +///////////////////////////////////////////////////////// + +////////////////////////// +static ULong stats__getOrdering_queries = 0; +static ULong stats__getOrdering_misses = 0; +static ULong stats__join2_queries = 0; +static ULong stats__join2_misses = 0; + +static inline UInt ROL32 ( UInt w, Int n ) { + w = (w << n) | (w >> (32-n)); + return w; +} +static inline UInt hash_VtsIDs ( VtsID vi1, VtsID vi2, UInt nTab ) { + UInt hash = ROL32(vi1,19) ^ ROL32(vi2,13); + return hash % nTab; +} + +#define N_GETORDERING_CACHE 1023 +static + struct { VtsID vi1; VtsID vi2; POrd ord; } + getOrdering_cache[N_GETORDERING_CACHE]; + +#define N_JOIN2_CACHE 1023 +static + struct { VtsID vi1; VtsID vi2; VtsID res; } + join2_cache[N_JOIN2_CACHE]; + +static void VtsID__invalidate_caches ( void ) { + Int i; + for (i = 0; i < N_GETORDERING_CACHE; i++) { + getOrdering_cache[i].vi1 = VtsID_INVALID; + getOrdering_cache[i].vi2 = VtsID_INVALID; + getOrdering_cache[i].ord = 0; /* an invalid POrd value */ + } + for (i = 0; i < N_JOIN2_CACHE; i++) { + join2_cache[i].vi1 = VtsID_INVALID; + join2_cache[i].vi2 = VtsID_INVALID; + join2_cache[i].res = VtsID_INVALID; + } +} +////////////////////////// + +//static Bool VtsID__is_valid ( VtsID vi ) { +// VtsTE* ve; +// if (vi >= (VtsID)VG_(sizeXA)( vts_tab )) +// return False; +// ve = VG_(indexXA)( vts_tab, vi ); +// if (!ve->vts) +// return False; +// tl_assert(ve->vts->id == vi); +// return True; +//} + +static VTS* VtsID__to_VTS ( VtsID vi ) { + VtsTE* te = VG_(indexXA)( vts_tab, vi ); + tl_assert(te->vts); + return te->vts; +} + +static void VtsID__pp ( VtsID vi ) { + HChar buf[100]; + VTS* vts = VtsID__to_VTS(vi); + VTS__show( buf, sizeof(buf)-1, vts ); + buf[sizeof(buf)-1] = 0; + VG_(printf)("%s", buf); +} + +/* compute partial ordering relation of vi1 and vi2. */ +__attribute__((noinline)) +static POrd VtsID__getOrdering_WRK ( VtsID vi1, VtsID vi2 ) { + UInt hash; + POrd ord; + VTS *v1, *v2; + //if (vi1 == vi2) return POrd_EQ; + tl_assert(vi1 != vi2); + ////++ + stats__getOrdering_queries++; + hash = hash_VtsIDs(vi1, vi2, N_GETORDERING_CACHE); + if (getOrdering_cache[hash].vi1 == vi1 + && getOrdering_cache[hash].vi2 == vi2) + return getOrdering_cache[hash].ord; + stats__getOrdering_misses++; + ////-- + v1 = VtsID__to_VTS(vi1); + v2 = VtsID__to_VTS(vi2); + ord = VTS__cmp( v1, v2 ); + ////++ + getOrdering_cache[hash].vi1 = vi1; + getOrdering_cache[hash].vi2 = vi2; + getOrdering_cache[hash].ord = ord; + ////-- + return ord; +} +static inline POrd VtsID__getOrdering ( VtsID vi1, VtsID vi2 ) { + return vi1 == vi2 ? POrd_EQ : VtsID__getOrdering_WRK(vi1, vi2); +} + +/* compute binary join */ +__attribute__((noinline)) +static VtsID VtsID__join2_WRK ( VtsID vi1, VtsID vi2 ) { + UInt hash; + VtsID res; + VTS *vts1, *vts2, *nyu; + //if (vi1 == vi2) return vi1; + tl_assert(vi1 != vi2); + ////++ + stats__join2_queries++; + hash = hash_VtsIDs(vi1, vi2, N_JOIN2_CACHE); + if (join2_cache[hash].vi1 == vi1 + && join2_cache[hash].vi2 == vi2) + return join2_cache[hash].res; + stats__join2_misses++; + ////-- + vts1 = VtsID__to_VTS(vi1); + vts2 = VtsID__to_VTS(vi2); + nyu = VTS__join(vts1,vts2); + res = vts_tab__find_and_dealloc__or_add(nyu); + ////++ + join2_cache[hash].vi1 = vi1; + join2_cache[hash].vi2 = vi2; + join2_cache[hash].res = res; + ////-- + return res; +} +static inline VtsID VtsID__join2 ( VtsID vi1, VtsID vi2 ) { + return vi1 == vi2 ? vi1 : VtsID__join2_WRK(vi1, vi2); +} + +/* create a singleton VTS, namely [thr:1] */ +static VtsID VtsID__mk_Singleton ( Thr* thr, ULong tym ) { + VTS* nyu = VTS__singleton(thr,tym); + return vts_tab__find_and_dealloc__or_add(nyu); +} + +/* tick operation, creates value 1 if specified index is absent */ +static VtsID VtsID__tick ( VtsID vi, Thr* idx ) { + VTS* vts = VtsID__to_VTS(vi); + VTS* nyu = VTS__tick(idx,vts); + return vts_tab__find_and_dealloc__or_add(nyu); +} + +/* index into a VTS (only for assertions) */ +static ULong VtsID__indexAt ( VtsID vi, Thr* idx ) { + VTS* vts = VtsID__to_VTS(vi); + return VTS__indexAt_SLOW( vts, idx ); +} + + +///////////////////////////////////////////////////////// +// // +// Threads // +// // +///////////////////////////////////////////////////////// + +struct _Thr { + /* Current VTSs for this thread. They change as we go along. viR + is the VTS to be used for reads, viW for writes. Usually they + are the same, but can differ when we deal with reader-writer + locks. It is always the case that VtsID__getOrdering(viW,viR) + == POrd_LT or POrdEQ -- that is, viW must be the same, or + lagging behind, viR. */ + VtsID viR; + VtsID viW; + /* opaque (to us) data we hold on behalf of the library's user. */ + void* opaque; +}; + +static Thr* Thr__new ( void ) { + Thr* thr = HG_(zalloc)( "libhb.Thr__new.1", sizeof(Thr) ); + thr->viR = VtsID_INVALID; + thr->viW = VtsID_INVALID; + return thr; +} + + +///////////////////////////////////////////////////////// +// // +// Shadow Values // +// // +///////////////////////////////////////////////////////// + +// type SVal, SVal_INVALID and SVal_NOACCESS are defined by +// hb_zsm.h. We have to do everything else here. + +/* SVal is 64 bit unsigned int. + + <---------30---------> <---------30---------> + 00 X-----Rmin-VtsID-----X 00 X-----Wmin-VtsID-----X C(Rmin,Wmin) + 01 X--------------------X XX X--------------------X E(rror) + 10 X--------------------X XX X--------------------X A: SVal_NOACCESS + 11 X--------------------X XX X--------------------X I: SVal_INVALID +*/ +#define SVAL_TAGMASK (3ULL << 62) + +static inline Bool SVal__isC ( SVal s ) { + return (0ULL << 62) == (s & SVAL_TAGMASK); +} +static inline SVal SVal__mkC ( VtsID rmini, VtsID wmini ) { + //tl_assert(VtsID__is_valid(rmini)); + //tl_assert(VtsID__is_valid(wmini)); + return (((ULong)rmini) << 32) | ((ULong)wmini); +} +static inline VtsID SVal__unC_Rmin ( SVal s ) { + tl_assert(SVal__isC(s)); + return (VtsID)(s >> 32); +} +static inline VtsID SVal__unC_Wmin ( SVal s ) { + tl_assert(SVal__isC(s)); + return (VtsID)(s & 0xFFFFFFFFULL); +} + +static Bool SVal__isE ( SVal s ) { + return (1ULL << 62) == (s & SVAL_TAGMASK); +} +static SVal SVal__mkE ( void ) { + return 1ULL << 62; +} + +static Bool SVal__isA ( SVal s ) { + return (2ULL << 62) == (s & SVAL_TAGMASK); +} +static SVal SVal__mkA ( void ) { + return 2ULL << 62; +} + +/* Direct callback from lib_zsm. */ +static void SVal__rcinc ( SVal s ) { + if (SVal__isC(s)) { + VtsID__rcinc( SVal__unC_Rmin(s) ); + VtsID__rcinc( SVal__unC_Wmin(s) ); + } +} + +/* Direct callback from lib_zsm. */ +static void SVal__rcdec ( SVal s ) { + if (SVal__isC(s)) { + VtsID__rcdec( SVal__unC_Rmin(s) ); + VtsID__rcdec( SVal__unC_Wmin(s) ); + } +} + + +///////////////////////////////////////////////////////// +// // +// A simple group (memory) allocator // +// // +///////////////////////////////////////////////////////// + +//////////////// BEGIN general group allocator +typedef + struct { + UWord elemSzB; /* element size */ + UWord nPerGroup; /* # elems per group */ + void* (*alloc)(HChar*, SizeT); /* group allocator */ + HChar* cc; /* group allocator's cc */ + void (*free)(void*); /* group allocator's free-er (unused) */ + /* XArray of void* (pointers to groups). The groups themselves. + Each element is a pointer to a block of size (elemSzB * + nPerGroup) bytes. */ + XArray* groups; + /* next free element. Is a pointer to an element in one of the + groups pointed to by .groups. */ + void* nextFree; + } + GroupAlloc; + +static void init_GroupAlloc ( /*MOD*/GroupAlloc* ga, + UWord elemSzB, + UWord nPerGroup, + void* (*alloc)(HChar*, SizeT), + HChar* cc, + void (*free)(void*) ) +{ + tl_assert(0 == (elemSzB % sizeof(UWord))); + tl_assert(elemSzB >= sizeof(UWord)); + tl_assert(nPerGroup >= 100); /* let's say */ + tl_assert(alloc); + tl_assert(cc); + tl_assert(free); + tl_assert(ga); + VG_(memset)(ga, 0, sizeof(*ga)); + ga->elemSzB = elemSzB; + ga->nPerGroup = nPerGroup; + ga->groups = NULL; + ga->alloc = alloc; + ga->cc = cc; + ga->free = free; + ga->groups = VG_(newXA)( alloc, cc, free, sizeof(void*) ); + ga->nextFree = NULL; + tl_assert(ga->groups); +} + +/* The freelist is empty. Allocate a new group and put all the new + elements in it onto the freelist. */ +__attribute__((noinline)) +static void gal_add_new_group ( GroupAlloc* ga ) +{ + Word i; + UWord* group; + tl_assert(ga); + tl_assert(ga->nextFree == NULL); + group = ga->alloc( ga->cc, ga->elemSzB * ga->nPerGroup ); + tl_assert(group); + /* extend the freelist through the new group. Place the freelist + pointer in the first word of each element. That's why the + element size must be at least one word. */ + for (i = ga->nPerGroup-1; i >= 0; i--) { + UChar* elemC = ((UChar*)group) + i * ga->elemSzB; + UWord* elem = (UWord*)elemC; + tl_assert(0 == (((UWord)elem) % sizeof(UWord))); + *elem = (UWord)ga->nextFree; + ga->nextFree = elem; + } + /* and add to our collection of groups */ + VG_(addToXA)( ga->groups, &group ); +} + +inline static void* gal_Alloc ( GroupAlloc* ga ) +{ + UWord* elem; + if (UNLIKELY(ga->nextFree == NULL)) { + gal_add_new_group(ga); + } + elem = ga->nextFree; + ga->nextFree = (void*)*elem; + *elem = 0; /* unnecessary, but just to be on the safe side */ + return elem; +} + +inline static void* gal_Alloc_w_size_check ( GroupAlloc* ga, SizeT n ) +{ + tl_assert(n == ga->elemSzB); + return gal_Alloc( ga ); +} + +inline static void gal_Free ( GroupAlloc* ga, void* p ) +{ + UWord* elem = (UWord*)p; + *elem = (UWord)ga->nextFree; + ga->nextFree = elem; +} +//////////////// END general group allocator + + +///////////////////////////////////////////////////////// +// // +// Change-event map2 // +// // +///////////////////////////////////////////////////////// + +#define EVENT_MAP_GC_DISCARD_FRACTION 0.5 + +/* This is in two parts: + + 1. An OSet of RCECs. This is a set of reference-counted stack + traces. When the reference count of a stack trace becomes zero, + it is removed from the set and freed up. The intent is to have + a set of stack traces which can be referred to from (2), but to + only represent each one once. The set is indexed/searched by + ordering on the stack trace vectors. + + 2. A SparseWA of OldRefs. These store information about each old + ref that we need to record. It is indexed by address of the + location for which the information is recorded. For LRU + purposes, each OldRef also contains a generation number, + indicating when it was most recently accessed. + + The important part of an OldRef is, however, its accs[] array. + This is an array of N_OLDREF_ACCS which binds (thread, R/W, + size) triples to RCECs. This allows us to collect the last + access-traceback by up to N_OLDREF_ACCS different triples for + this location. The accs[] array is a MTF-array. If a binding + falls off the end, that's too bad -- we will lose info about + that triple's access to this location. + + When the SparseWA becomes too big, we can throw away the OldRefs + whose generation numbers are below some threshold; hence doing + approximate LRU discarding. For each discarded OldRef we must + of course decrement the reference count on the all RCECs it + refers to, in order that entries from (1) eventually get + discarded too. + + A major improvement in reliability of this mechanism would be to + have a dynamically sized OldRef.accs[] array, so no entries ever + fall off the end. In investigations (Dec 08) it appears that a + major cause for the non-availability of conflicting-access traces + in race reports is caused by the fixed size of this array. I + suspect for most OldRefs, only a few entries are used, but for a + minority of cases there is an overflow, leading to info lossage. + Investigations also suggest this is very workload and scheduling + sensitive. Therefore a dynamic sizing would be better. + + However, dynamic sizing would defeat the use of a GroupAllocator + for OldRef structures. And that's important for performance. So + it's not straightforward to do. +*/ + + +static UWord stats__ctxt_rcdec1 = 0; +static UWord stats__ctxt_rcdec2 = 0; +static UWord stats__ctxt_rcdec3 = 0; +static UWord stats__ctxt_rcdec_calls = 0; +static UWord stats__ctxt_rcdec_discards = 0; +static UWord stats__ctxt_rcdec1_eq = 0; + +static UWord stats__ctxt_tab_curr = 0; +static UWord stats__ctxt_tab_max = 0; + +static UWord stats__ctxt_tab_qs = 0; +static UWord stats__ctxt_tab_cmps = 0; + + +/////////////////////////////////////////////////////// +//// Part (1): An OSet of RCECs +/// + +#define N_FRAMES 8 + +// (UInt) `echo "Reference Counted Execution Context" | md5sum` +#define RCEC_MAGIC 0xab88abb2UL + +//#define N_RCEC_TAB 98317 /* prime */ +#define N_RCEC_TAB 196613 /* prime */ + +typedef + struct _RCEC { + UWord magic; /* sanity check only */ + struct _RCEC* next; + UWord rc; + UWord rcX; /* used for crosschecking */ + UWord frames[1 + N_FRAMES]; /* first word is hash of all the rest */ + } + RCEC; + +static RCEC** contextTab = NULL; /* hash table of RCEC*s */ + + +/* Gives an arbitrary total order on RCEC .frames fields */ +static Word RCEC__cmp_by_frames ( RCEC* ec1, RCEC* ec2 ) { + Word i; + tl_assert(ec1 && ec1->magic == RCEC_MAGIC); + tl_assert(ec2 && ec2->magic == RCEC_MAGIC); + if (ec1->frames[0] < ec2->frames[0]) return -1; + if (ec1->frames[0] > ec2->frames[0]) return 1; + for (i = 1; i < 1 + N_FRAMES; i++) { + if (ec1->frames[i] < ec2->frames[i]) return -1; + if (ec1->frames[i] > ec2->frames[i]) return 1; + } + return 0; +} + + +/* Dec the ref of this RCEC. */ +static void ctxt__rcdec ( RCEC* ec ) +{ + stats__ctxt_rcdec_calls++; + tl_assert(ec && ec->magic == RCEC_MAGIC); + tl_assert(ec->rc > 0); + ec->rc--; +} + +static void ctxt__rcinc ( RCEC* ec ) +{ + tl_assert(ec && ec->magic == RCEC_MAGIC); + ec->rc++; +} + + +//////////// BEGIN RCEC group allocator +static GroupAlloc rcec_group_allocator; + +static RCEC* alloc_RCEC ( void ) { + return gal_Alloc ( &rcec_group_allocator ); +} + +static void free_RCEC ( RCEC* rcec ) { + tl_assert(rcec->magic == RCEC_MAGIC); + gal_Free( &rcec_group_allocator, rcec ); +} +//////////// END OldRef group allocator + + +/* Find 'ec' in the RCEC list whose head pointer lives at 'headp' and + move it one step closer the the front of the list, so as to make + subsequent searches for it cheaper. */ +static void move_RCEC_one_step_forward ( RCEC** headp, RCEC* ec ) +{ + RCEC *ec0, *ec1, *ec2; + if (ec == *headp) + tl_assert(0); /* already at head of list */ + tl_assert(ec != NULL); + ec0 = *headp; + ec1 = NULL; + ec2 = NULL; + while (True) { + if (ec0 == NULL || ec0 == ec) break; + ec2 = ec1; + ec1 = ec0; + ec0 = ec0->next; + } + tl_assert(ec0 == ec); + if (ec0 != NULL && ec1 != NULL && ec2 != NULL) { + RCEC* tmp; + /* ec0 points to ec, ec1 to its predecessor, and ec2 to ec1's + predecessor. Swap ec0 and ec1, that is, move ec0 one step + closer to the start of the list. */ + tl_assert(ec2->next == ec1); + tl_assert(ec1->next == ec0); + tmp = ec0->next; + ec2->next = ec0; + ec0->next = ec1; + ec1->next = tmp; + } + else + if (ec0 != NULL && ec1 != NULL && ec2 == NULL) { + /* it's second in the list. */ + tl_assert(*headp == ec1); + tl_assert(ec1->next == ec0); + ec1->next = ec0->next; + ec0->next = ec1; + *headp = ec0; + } +} + + +/* Find the given RCEC in the tree, and return a pointer to it. Or, + if not present, add the given one to the tree (by making a copy of + it, so the caller can immediately deallocate the original) and + return a pointer to the copy. The caller can safely have 'example' + on its stack, since we will always return a pointer to a copy of + it, not to the original. Note that the inserted node will have .rc + of zero and so the caller must immediatly increment it. */ +__attribute__((noinline)) +static RCEC* ctxt__find_or_add ( RCEC* example ) +{ + UWord hent; + RCEC* copy; + tl_assert(example && example->magic == RCEC_MAGIC); + tl_assert(example->rc == 0); + + /* Search the hash table to see if we already have it. */ + stats__ctxt_tab_qs++; + hent = example->frames[0] % N_RCEC_TAB; + copy = contextTab[hent]; + while (1) { + if (!copy) break; + tl_assert(copy->magic == RCEC_MAGIC); + stats__ctxt_tab_cmps++; + if (0 == RCEC__cmp_by_frames(copy, example)) break; + copy = copy->next; + } + + if (copy) { + tl_assert(copy != example); + /* optimisation: if it's not at the head of its list, move 1 + step fwds, to make future searches cheaper */ + if (copy != contextTab[hent]) { + move_RCEC_one_step_forward( &contextTab[hent], copy ); + } + } else { + copy = alloc_RCEC(); + tl_assert(copy != example); + *copy = *example; + copy->next = contextTab[hent]; + contextTab[hent] = copy; + stats__ctxt_tab_curr++; + if (stats__ctxt_tab_curr > stats__ctxt_tab_max) + stats__ctxt_tab_max = stats__ctxt_tab_curr; + } + return copy; +} + +static inline UWord ROLW ( UWord w, Int n ) +{ + Int bpw = 8 * sizeof(UWord); + w = (w << n) | (w >> (bpw-n)); + return w; +} + +__attribute__((noinline)) +static RCEC* get_RCEC ( Thr* thr ) +{ + UWord hash, i; + RCEC example; + example.magic = RCEC_MAGIC; + example.rc = 0; + example.rcX = 0; + main_get_stacktrace( thr, &example.frames[1], N_FRAMES ); + hash = 0; + for (i = 1; i < 1 + N_FRAMES; i++) { + hash ^= example.frames[i]; + hash = ROLW(hash, 19); + } + example.frames[0] = hash; + return ctxt__find_or_add( &example ); +} + +/////////////////////////////////////////////////////// +//// Part (2): +/// A SparseWA guest-addr -> OldRef, that refers to (1) +/// + +// (UInt) `echo "Old Reference Information" | md5sum` +#define OldRef_MAGIC 0x30b1f075UL + +/* Records an access: a thread and a context. The size + (1,2,4,8) and read-or-writeness are also encoded as + follows: bottom bit of .thr is 1 if write, 0 if read + bottom 2 bits of .rcec are encode size: + 00 = 1, 01 = 2, 10 = 4, 11 = 8 +*/ +typedef struct { Thr* thr; RCEC* rcec; } Thr_n_RCEC; + +#define N_OLDREF_ACCS 5 + +typedef + struct { + UWord magic; /* sanity check only */ + UWord gen; /* when most recently accessed */ + /* or free list when not in use */ + /* unused slots in this array have .thr == NULL */ + Thr_n_RCEC accs[N_OLDREF_ACCS]; + } + OldRef; + + +//////////// BEGIN OldRef group allocator +static GroupAlloc oldref_group_allocator; + +static OldRef* alloc_OldRef ( void ) { + return gal_Alloc ( &oldref_group_allocator ); +} + +static void free_OldRef ( OldRef* r ) { + tl_assert(r->magic == OldRef_MAGIC); + gal_Free( &oldref_group_allocator, r ); +} +//////////// END OldRef group allocator + + +static SparseWA* oldrefTree = NULL; /* SparseWA* OldRef* */ +static UWord oldrefGen = 0; /* current LRU generation # */ +static UWord oldrefTreeN = 0; /* # elems in oldrefTree */ +static UWord oldrefGenIncAt = 0; /* inc gen # when size hits this */ + +inline static void* ptr_or_UWord ( void* p, UWord w ) { + return (void*)( ((UWord)p) | ((UWord)w) ); +} +inline static void* ptr_and_UWord ( void* p, UWord w ) { + return (void*)( ((UWord)p) & ((UWord)w) ); +} + +inline static UInt min_UInt ( UInt a, UInt b ) { + return a < b ? a : b; +} + +/* Compare the intervals [a1,a1+n1) and [a2,a2+n2). Return -1 if the + first interval is lower, 1 if the first interval is higher, and 0 + if there is any overlap. Redundant paranoia with casting is there + following what looked distinctly like a bug in gcc-4.1.2, in which + some of the comparisons were done signedly instead of + unsignedly. */ +/* Copied from exp-ptrcheck/sg_main.c */ +static Word cmp_nonempty_intervals ( Addr a1, SizeT n1, + Addr a2, SizeT n2 ) { + UWord a1w = (UWord)a1; + UWord n1w = (UWord)n1; + UWord a2w = (UWord)a2; + UWord n2w = (UWord)n2; + tl_assert(n1w > 0 && n2w > 0); + if (a1w + n1w <= a2w) return -1L; + if (a2w + n2w <= a1w) return 1L; + return 0; +} + +static void event_map_bind ( Addr a, SizeT szB, Bool isW, Thr* thr ) +{ + OldRef* ref; + RCEC* rcec; + Word i, j; + UWord keyW, valW; + Bool b; + + rcec = get_RCEC( thr ); + ctxt__rcinc(rcec); + + /* encode the size and writeness of the transaction in the bottom + two bits of thr and rcec. */ + thr = ptr_or_UWord(thr, isW ? 1 : 0); + switch (szB) { + /* This doesn't look particularly branch-predictor friendly. */ + case 1: rcec = ptr_or_UWord(rcec, 0); break; + case 2: rcec = ptr_or_UWord(rcec, 1); break; + case 4: rcec = ptr_or_UWord(rcec, 2); break; + case 8: rcec = ptr_or_UWord(rcec, 3); break; + default: tl_assert(0); + } + + /* Look in the map to see if we already have this. */ + b = VG_(lookupSWA)( oldrefTree, &keyW, &valW, a ); + + if (b) { + + /* We already have a record for this address. We now need to + see if we have a stack trace pertaining to this (thread, R/W, + size) triple. */ + tl_assert(keyW == a); + ref = (OldRef*)valW; + tl_assert(ref->magic == OldRef_MAGIC); + + tl_assert(thr); + for (i = 0; i < N_OLDREF_ACCS; i++) { + if (ref->accs[i].thr != thr) + continue; + /* since .thr encodes both the accessing thread and the + read/writeness, we know now that at least those features + of the access match this entry. So we just need to check + the size indication. Do this by inspecting the lowest 2 bits of + .rcec, which contain the encoded size info. */ + if (ptr_and_UWord(ref->accs[i].rcec,3) != ptr_and_UWord(rcec,3)) + continue; + /* else we have a match, so stop looking. */ + break; + } + + if (i < N_OLDREF_ACCS) { + /* thread 'thr' has an entry at index 'i'. Update it. */ + if (i > 0) { + Thr_n_RCEC tmp = ref->accs[i-1]; + ref->accs[i-1] = ref->accs[i]; + ref->accs[i] = tmp; + i--; + } + if (rcec == ref->accs[i].rcec) stats__ctxt_rcdec1_eq++; + stats__ctxt_rcdec1++; + ctxt__rcdec( ptr_and_UWord(ref->accs[i].rcec, ~3) ); + ref->accs[i].rcec = rcec; + tl_assert(ref->accs[i].thr == thr); + } else { + /* No entry for this (thread, R/W, size) triple. Shuffle all + of them down one slot, and put the new entry at the start + of the array. */ + if (ref->accs[N_OLDREF_ACCS-1].thr) { + /* the last slot is in use. We must dec the rc on the + associated rcec. */ + tl_assert(ref->accs[N_OLDREF_ACCS-1].rcec); + stats__ctxt_rcdec2++; + if (0 && 0 == (stats__ctxt_rcdec2 & 0xFFF)) + VG_(printf)("QQQQ %lu overflows\n",stats__ctxt_rcdec2); + ctxt__rcdec( ptr_and_UWord(ref->accs[N_OLDREF_ACCS-1].rcec, ~3) ); + } else { + tl_assert(!ref->accs[N_OLDREF_ACCS-1].rcec); + } + for (j = N_OLDREF_ACCS-1; j >= 1; j--) + ref->accs[j] = ref->accs[j-1]; + ref->accs[0].thr = thr; + ref->accs[0].rcec = rcec; + /* thr==NULL is used to signify an empty slot, so we can't + add a NULL thr. */ + tl_assert(ptr_and_UWord(thr, ~3) != 0); + } + + ref->gen = oldrefGen; + + } else { + + /* We don't have a record for this address. Create a new one. */ + if (oldrefTreeN >= oldrefGenIncAt) { + oldrefGen++; + oldrefGenIncAt = oldrefTreeN + 50000; + if (0) VG_(printf)("oldrefTree: new gen %lu at size %lu\n", + oldrefGen, oldrefTreeN ); + } + + ref = alloc_OldRef(); + ref->magic = OldRef_MAGIC; + ref->gen = oldrefGen; + ref->accs[0].rcec = rcec; + ref->accs[0].thr = thr; + /* thr==NULL is used to signify an empty slot, so we can't add a + NULL thr. */ + tl_assert(ptr_and_UWord(thr, ~3) != 0); + for (j = 1; j < N_OLDREF_ACCS; j++) { + ref->accs[j].thr = NULL; + ref->accs[j].rcec = NULL; + } + VG_(addToSWA)( oldrefTree, a, (UWord)ref ); + oldrefTreeN++; + + } +} + + +Bool libhb_event_map_lookup ( /*OUT*/ExeContext** resEC, + /*OUT*/Thr** resThr, + /*OUT*/SizeT* resSzB, + /*OUT*/Bool* resIsW, + Thr* thr, Addr a, SizeT szB, Bool isW ) +{ + Word i, j; + OldRef* ref; + UWord keyW, valW; + Bool b; + + Thr* cand_thr; + RCEC* cand_rcec; + Bool cand_isW; + SizeT cand_szB; + Addr cand_a; + + Addr toCheck[15]; + Int nToCheck = 0; + + tl_assert(thr); + tl_assert(szB == 8 || szB == 4 || szB == 2 || szB == 1); + + toCheck[nToCheck++] = a; + for (i = -7; i < (Word)szB; i++) { + if (i != 0) + toCheck[nToCheck++] = a + i; + } + tl_assert(nToCheck <= 15); + + /* Now see if we can find a suitable matching event for + any of the addresses in toCheck[0 .. nToCheck-1]. */ + for (j = 0; j < nToCheck; j++) { + + cand_a = toCheck[j]; + // VG_(printf)("test %ld %p\n", j, cand_a); + + b = VG_(lookupSWA)( oldrefTree, &keyW, &valW, cand_a ); + if (!b) + continue; + + ref = (OldRef*)valW; + tl_assert(keyW == cand_a); + tl_assert(ref->magic == OldRef_MAGIC); + tl_assert(ref->accs[0].thr); /* first slot must always be used */ + + cand_thr = NULL; + cand_rcec = NULL; + cand_isW = False; + cand_szB = 0; + + for (i = 0; i < N_OLDREF_ACCS; i++) { + Thr_n_RCEC* cand = &ref->accs[i]; + cand_thr = ptr_and_UWord(cand->thr, ~3); + cand_rcec = ptr_and_UWord(cand->rcec, ~3); + /* Decode the writeness from the bottom bit of .thr. */ + cand_isW = 1 == (UWord)ptr_and_UWord(cand->thr, 1); + /* Decode the size from the bottom two bits of .rcec. */ + switch ((UWord)ptr_and_UWord(cand->rcec, 3)) { + case 0: cand_szB = 1; break; + case 1: cand_szB = 2; break; + case 2: cand_szB = 4; break; + case 3: cand_szB = 8; break; + default: tl_assert(0); + } + + if (cand_thr == NULL) + /* This slot isn't in use. Ignore it. */ + continue; + + if (cand_thr == thr) + /* This is an access by the same thread, but we're only + interested in accesses from other threads. Ignore. */ + continue; + + if ((!cand_isW) && (!isW)) + /* We don't want to report a read racing against another + read; that's stupid. So in this case move on. */ + continue; + + if (cmp_nonempty_intervals(a, szB, cand_a, cand_szB) != 0) + /* No overlap with the access we're asking about. Ignore. */ + continue; + + /* We have a match. Stop searching. */ + break; + } + + tl_assert(i >= 0 && i <= N_OLDREF_ACCS); + + if (i < N_OLDREF_ACCS) { + /* return with success */ + tl_assert(cand_thr); + tl_assert(cand_rcec); + tl_assert(cand_rcec->magic == RCEC_MAGIC); + tl_assert(cand_szB >= 1); + *resEC = VG_(make_ExeContext_from_StackTrace)( + &cand_rcec->frames[1], + min_UInt(N_FRAMES, VG_(clo_backtrace_size)) + ); + *resThr = cand_thr; + *resSzB = cand_szB; + *resIsW = cand_isW; + return True; + } + + /* consider next address in toCheck[] */ + } /* for (j = 0; j < nToCheck; j++) */ + + /* really didn't find anything. */ + return False; +} + +static void event_map_init ( void ) +{ + Word i; + + /* Context (RCEC) group allocator */ + init_GroupAlloc ( &rcec_group_allocator, + sizeof(RCEC), + 1000 /* RCECs per group */, + HG_(zalloc), + "libhb.event_map_init.1 (RCEC groups)", + HG_(free) ); + + /* Context table */ + tl_assert(!contextTab); + contextTab = HG_(zalloc)( "libhb.event_map_init.2 (context table)", + N_RCEC_TAB * sizeof(RCEC*) ); + tl_assert(contextTab); + for (i = 0; i < N_RCEC_TAB; i++) + contextTab[i] = NULL; + + /* Oldref group allocator */ + init_GroupAlloc ( &oldref_group_allocator, + sizeof(OldRef), + 1000 /* OldRefs per group */, + HG_(zalloc), + "libhb.event_map_init.3 (OldRef groups)", + HG_(free) ); + + /* Oldref tree */ + tl_assert(!oldrefTree); + oldrefTree = VG_(newSWA)( + HG_(zalloc), + "libhb.event_map_init.4 (oldref tree)", + HG_(free) + ); + tl_assert(oldrefTree); + + oldrefGen = 0; + oldrefGenIncAt = 0; + oldrefTreeN = 0; +} + +static void event_map__check_reference_counts ( Bool before ) +{ + RCEC* rcec; + OldRef* oldref; + Word i; + UWord nEnts = 0; + UWord keyW, valW; + + /* Set the 'check' reference counts to zero. Also, optionally + check that the real reference counts are non-zero. We allow + these to fall to zero before a GC, but the GC must get rid of + all those that are zero, hence none should be zero after a + GC. */ + for (i = 0; i < N_RCEC_TAB; i++) { + for (rcec = contextTab[i]; rcec; rcec = rcec->next) { + nEnts++; + tl_assert(rcec); + tl_assert(rcec->magic == RCEC_MAGIC); + if (!before) + tl_assert(rcec->rc > 0); + rcec->rcX = 0; + } + } + + /* check that the stats are sane */ + tl_assert(nEnts == stats__ctxt_tab_curr); + tl_assert(stats__ctxt_tab_curr <= stats__ctxt_tab_max); + + /* visit all the referencing points, inc check ref counts */ + VG_(initIterSWA)( oldrefTree ); + while (VG_(nextIterSWA)( oldrefTree, &keyW, &valW )) { + oldref = (OldRef*)valW; + tl_assert(oldref->magic == OldRef_MAGIC); + for (i = 0; i < N_OLDREF_ACCS; i++) { + Thr* aThr = ptr_and_UWord(oldref->accs[i].thr, ~3); + RCEC* aRef = ptr_and_UWord(oldref->accs[i].rcec, ~3); + if (aThr) { + tl_assert(aRef); + tl_assert(aRef->magic == RCEC_MAGIC); + aRef->rcX++; + } else { + tl_assert(!aRef); + } + } + } + + /* compare check ref counts with actual */ + for (i = 0; i < N_RCEC_TAB; i++) { + for (rcec = contextTab[i]; rcec; rcec = rcec->next) { + tl_assert(rcec->rc == rcec->rcX); + } + } +} + +__attribute__((noinline)) +static void event_map_maybe_GC ( void ) +{ + OldRef* oldref; + UWord keyW, valW, retained, maxGen; + XArray* refs2del; + Word i, j, n2del; + + UWord* genMap = NULL; + UWord genMap_min = 0; + UWord genMap_size = 0; + + if (LIKELY(oldrefTreeN < HG_(clo_conflict_cache_size))) + return; + + if (0) + VG_(printf)("libhb: event_map GC at size %lu\n", oldrefTreeN); + + /* Check for sane command line params. Limit values must match + those in hg_process_cmd_line_option. */ + tl_assert( HG_(clo_conflict_cache_size) >= 10*1000 ); + tl_assert( HG_(clo_conflict_cache_size) <= 10*1000*1000 ); + + /* Check our counting is sane (expensive) */ + if (CHECK_CEM) + tl_assert(oldrefTreeN == VG_(sizeSWA)( oldrefTree )); + + /* Check the reference counts (expensive) */ + if (CHECK_CEM) + event_map__check_reference_counts( True/*before*/ ); + + /* Compute the distribution of generation values in the ref tree. + There are likely only to be a few different generation numbers + in the whole tree, but we don't know what they are. Hence use a + dynamically resized array of counters. The array is genMap[0 + .. genMap_size-1], where genMap[0] is the count for the + generation number genMap_min, genMap[1] is the count for + genMap_min+1, etc. If a new number is seen outside the range + [genMap_min .. genMap_min + genMap_size - 1] then the array is + copied into a larger array, and genMap_min and genMap_size are + adjusted accordingly. */ + + /* genMap :: generation-number -> count-of-nodes-with-that-number */ + + VG_(initIterSWA)( oldrefTree ); + while ( VG_(nextIterSWA)( oldrefTree, &keyW, &valW )) { + + UWord ea, key; + oldref = (OldRef*)valW; + key = oldref->gen; + + /* BEGIN find 'ea', which is the index in genMap holding the + count for generation number 'key'. */ + if (UNLIKELY(genMap == NULL)) { + /* deal with the first key to be seen, so that the following + cases don't need to handle the complexity of a NULL count + array. */ + genMap_min = key; + genMap_size = 1; + genMap = HG_(zalloc)( "libhb.emmG.1a", + genMap_size * sizeof(UWord) ); + ea = 0; + if (0) VG_(printf)("(%lu) case 1 [%lu .. %lu]\n", + key, genMap_min, genMap_min+genMap_size- 1 ); + } + else + if (LIKELY(key >= genMap_min && key < genMap_min + genMap_size)) { + /* this is the expected (almost-always-happens) case: 'key' + is already mapped in the array. */ + ea = key - genMap_min; + } + else + if (key < genMap_min) { + /* 'key' appears before the start of the current array. + Extend the current array by allocating a larger one and + copying the current one to the upper end of it. */ + Word more; + UWord* map2; + more = genMap_min - key; + tl_assert(more > 0); + map2 = HG_(zalloc)( "libhb.emmG.1b", + (genMap_size + more) * sizeof(UWord) ); + VG_(memcpy)( &map2[more], genMap, genMap_size * sizeof(UWord) ); + HG_(free)( genMap ); + genMap = map2; + genMap_size += more; + genMap_min -= more; + ea = 0; + tl_assert(genMap_min == key); + if (0) VG_(printf)("(%lu) case 2 [%lu .. %lu]\n", + key, genMap_min, genMap_min+genMap_size- 1 ); + } + else { + /* 'key' appears after the end of the current array. Extend + the current array by allocating a larger one and copying + the current one to the lower end of it. */ + Word more; + UWord* map2; + tl_assert(key >= genMap_min + genMap_size); + more = key - (genMap_min + genMap_size) + 1; + tl_assert(more > 0); + map2 = HG_(zalloc)( "libhb.emmG.1c", + (genMap_size + more) * sizeof(UWord) ); + VG_(memcpy)( &map2[0], genMap, genMap_size * sizeof(UWord) ); + HG_(free)( genMap ); + genMap = map2; + genMap_size += more; + ea = genMap_size - 1;; + tl_assert(genMap_min + genMap_size - 1 == key); + if (0) VG_(printf)("(%lu) case 3 [%lu .. %lu]\n", + key, genMap_min, genMap_min+genMap_size- 1 ); + } + /* END find 'ea' from 'key' */ + + tl_assert(ea >= 0 && ea < genMap_size); + /* and the whole point of this elaborate computation of 'ea' is .. */ + genMap[ea]++; + } + + tl_assert(genMap); + tl_assert(genMap_size > 0); + + /* Sanity check what we just computed */ + { UWord sum = 0; + for (i = 0; i < genMap_size; i++) { + if (0) VG_(printf)(" xxx: gen %ld has %lu\n", + i + genMap_min, genMap[i] ); + sum += genMap[i]; + } + tl_assert(sum == oldrefTreeN); + } + + /* Figure out how many generations to throw away */ + retained = oldrefTreeN; + maxGen = 0; + + for (i = 0; i < genMap_size; i++) { + keyW = i + genMap_min; + valW = genMap[i]; + tl_assert(keyW > 0); /* can't allow a generation # 0 */ + if (0) VG_(printf)(" XXX: gen %lu has %lu\n", keyW, valW ); + tl_assert(keyW >= maxGen); + tl_assert(retained >= valW); + if (retained - valW + > (UWord)(HG_(clo_conflict_cache_size) + * EVENT_MAP_GC_DISCARD_FRACTION)) { + retained -= valW; + maxGen = keyW; + } else { + break; + } + } + + HG_(free)(genMap); + + tl_assert(retained >= 0 && retained <= oldrefTreeN); + + /* Now make up a big list of the oldrefTree entries we want to + delete. We can't simultaneously traverse the tree and delete + stuff from it, so first we need to copy them off somewhere + else. (sigh) */ + refs2del = VG_(newXA)( HG_(zalloc), "libhb.emmG.2", + HG_(free), sizeof(Addr) ); + + if (retained < oldrefTreeN) { + + /* This is the normal (expected) case. We discard any ref whose + generation number <= maxGen. */ + VG_(initIterSWA)( oldrefTree ); + while (VG_(nextIterSWA)( oldrefTree, &keyW, &valW )) { + oldref = (OldRef*)valW; + tl_assert(oldref->magic == OldRef_MAGIC); + if (oldref->gen <= maxGen) { + VG_(addToXA)( refs2del, &keyW ); + } + } + if (VG_(clo_verbosity) > 1) { + VG_(message)(Vg_DebugMsg, + "libhb: EvM GC: delete generations %lu and below, " + "retaining %lu entries", + maxGen, retained ); + } + + } else { + + static UInt rand_seed = 0; /* leave as static */ + + /* Degenerate case: there's only one generation in the entire + tree, so we need to have some other way of deciding which + refs to throw away. Just throw out half of them randomly. */ + tl_assert(retained == oldrefTreeN); + VG_(initIterSWA)( oldrefTree ); + while (VG_(nextIterSWA)( oldrefTree, &keyW, &valW )) { + UInt n; + oldref = (OldRef*)valW; + tl_assert(oldref->magic == OldRef_MAGIC); + n = VG_(random)( &rand_seed ); + if ((n & 0xFFF) < 0x800) { + VG_(addToXA)( refs2del, &keyW ); + retained--; + } + } + if (VG_(clo_verbosity) > 1) { + VG_(message)(Vg_DebugMsg, + "libhb: EvM GC: randomly delete half the entries, " + "retaining %lu entries", + retained ); + } + + } + + n2del = VG_(sizeXA)( refs2del ); + tl_assert(n2del == (Word)(oldrefTreeN - retained)); + + if (0) VG_(printf)("%s","deleting entries\n"); + for (i = 0; i < n2del; i++) { + Bool b; + Addr ga2del = *(Addr*)VG_(indexXA)( refs2del, i ); + b = VG_(delFromSWA)( oldrefTree, &keyW, &valW, ga2del ); + tl_assert(b); + tl_assert(keyW == ga2del); + oldref = (OldRef*)valW; + for (j = 0; j < N_OLDREF_ACCS; j++) { + Thr* aThr = ptr_and_UWord(oldref->accs[j].thr, ~3); + RCEC* aRef = ptr_and_UWord(oldref->accs[j].rcec, ~3); + if (aRef) { + tl_assert(aThr); + stats__ctxt_rcdec3++; + ctxt__rcdec( aRef ); + } else { + tl_assert(!aThr); + } + } + + free_OldRef( oldref ); + } + + VG_(deleteXA)( refs2del ); + + tl_assert( VG_(sizeSWA)( oldrefTree ) == retained ); + + oldrefTreeN = retained; + oldrefGenIncAt = oldrefTreeN; /* start new gen right away */ + + /* Throw away all RCECs with zero reference counts */ + for (i = 0; i < N_RCEC_TAB; i++) { + RCEC** pp = &contextTab[i]; + RCEC* p = *pp; + while (p) { + if (p->rc == 0) { + *pp = p->next; + free_RCEC(p); + p = *pp; + tl_assert(stats__ctxt_tab_curr > 0); + stats__ctxt_tab_curr--; + } else { + pp = &p->next; + p = p->next; + } + } + } + + /* Check the reference counts (expensive) */ + if (CHECK_CEM) + event_map__check_reference_counts( False/*after*/ ); + + //if (0) + //VG_(printf)("XXXX final sizes: oldrefTree %ld, contextTree %ld\n\n", + // VG_(OSetGen_Size)(oldrefTree), VG_(OSetGen_Size)(contextTree)); + +} + + +///////////////////////////////////////////////////////// +// // +// Core MSM // +// // +///////////////////////////////////////////////////////// + +/* Logic in msm_read/msm_write updated/verified after re-analysis, + 19 Nov 08. */ + +/* 19 Nov 08: it seems that MSM_RACE2ERR == 1 is a bad idea. When + nonzero, the effect is that when a race is detected for a location, + that location is put into a special 'error' state and no further + checking of it is done until it returns to a 'normal' state, which + requires it to be deallocated and reallocated. + + This is a bad idea, because of the interaction with suppressions. + Suppose there is a race on the location, but the error is + suppressed. The location now is marked as in-error. Now any + subsequent race -- including ones we want to see -- will never be + detected until the location is deallocated and reallocated. + + Hence set MSM_RACE2ERR to zero. This causes raced-on locations to + remain in the normal 'C' (constrained) state, but places on them + the constraint that the next accesses happen-after both the + existing constraint and the relevant vector clock of the thread + doing the racing access. +*/ +#define MSM_RACE2ERR 0 + +static ULong stats__msm_read = 0; +static ULong stats__msm_read_change = 0; +static ULong stats__msm_write = 0; +static ULong stats__msm_write_change = 0; + +__attribute__((noinline)) +static void record_race_info ( Thr* acc_thr, + Addr acc_addr, SizeT szB, Bool isWrite ) +{ + /* Call here to report a race. We just hand it onwards to + HG_(record_error_Race). If that in turn discovers that the + error is going to be collected, then that queries the + conflicting-event map. The alternative would be to query it + right here. But that causes a lot of pointless queries for + errors which will shortly be discarded as duplicates, and can + become a performance overhead; so we defer the query until we + know the error is not a duplicate. */ + tl_assert(acc_thr->opaque); + HG_(record_error_Race)( acc_thr->opaque, acc_addr, + szB, isWrite, NULL/*mb_lastlock*/ ); +} + +static Bool is_sane_SVal_C ( SVal sv ) { + POrd ord; + if (!SVal__isC(sv)) return True; + ord = VtsID__getOrdering( SVal__unC_Rmin(sv), SVal__unC_Wmin(sv) ); + if (ord == POrd_EQ || ord == POrd_LT) return True; + return False; +} + + +/* Compute new state following a read */ +static inline SVal msm_read ( SVal svOld, + /* The following are only needed for + creating error reports. */ + Thr* acc_thr, + Addr acc_addr, SizeT szB ) +{ + SVal svNew = SVal_INVALID; + stats__msm_read++; + + /* Redundant sanity check on the constraints */ + if (CHECK_MSM) { + tl_assert(is_sane_SVal_C(svOld)); + } + + if (SVal__isC(svOld)) { + POrd ord; + VtsID tviR = acc_thr->viR; + VtsID tviW = acc_thr->viW; + VtsID rmini = SVal__unC_Rmin(svOld); + VtsID wmini = SVal__unC_Wmin(svOld); + + ord = VtsID__getOrdering(rmini,tviR); + if (ord == POrd_EQ || ord == POrd_LT) { + /* no race */ + /* Note: RWLOCK subtlety: use tviW, not tviR */ + svNew = SVal__mkC( rmini, VtsID__join2(wmini, tviW) ); + goto out; + } else { + /* assert on sanity of constraints. */ + POrd ordxx = VtsID__getOrdering(rmini,wmini); + tl_assert(ordxx == POrd_EQ || ordxx == POrd_LT); + svNew = MSM_RACE2ERR + ? SVal__mkE() + /* see comments on corresponding fragment in + msm_write for explanation. */ + /* aggressive setting: */ + /* + : SVal__mkC( VtsID__join2(wmini,tviR), + VtsID__join2(wmini,tviW) ); + */ + /* "consistent" setting: */ + : SVal__mkC( VtsID__join2(rmini,tviR), + VtsID__join2(wmini,tviW) ); + record_race_info( acc_thr, acc_addr, szB, False/*!isWrite*/ ); + goto out; + } + } + if (SVal__isA(svOld)) { + /* reading no-access memory (sigh); leave unchanged */ + /* check for no pollution */ + tl_assert(svOld == SVal_NOACCESS); + svNew = SVal_NOACCESS; + goto out; + } + if (SVal__isE(svOld)) { + /* no race, location is already "in error" */ + svNew = SVal__mkE(); + goto out; + } + VG_(printf)("msm_read: bad svOld: 0x%016llx\n", svOld); + tl_assert(0); + + out: + if (CHECK_MSM) { + tl_assert(is_sane_SVal_C(svNew)); + } + tl_assert(svNew != SVal_INVALID); + if (svNew != svOld && HG_(clo_show_conflicts)) { + if (SVal__isC(svOld) && SVal__isC(svNew)) { + event_map_bind( acc_addr, szB, False/*!isWrite*/, acc_thr ); + stats__msm_read_change++; + } + } + return svNew; +} + + +/* Compute new state following a write */ +static inline SVal msm_write ( SVal svOld, + /* The following are only needed for + creating error reports. */ + Thr* acc_thr, + Addr acc_addr, SizeT szB ) +{ + SVal svNew = SVal_INVALID; + stats__msm_write++; + + /* Redundant sanity check on the constraints */ + if (CHECK_MSM) { + tl_assert(is_sane_SVal_C(svOld)); + } + + if (SVal__isC(svOld)) { + POrd ord; + VtsID tviW = acc_thr->viW; + VtsID wmini = SVal__unC_Wmin(svOld); + + ord = VtsID__getOrdering(wmini,tviW); + if (ord == POrd_EQ || ord == POrd_LT) { + /* no race */ + svNew = SVal__mkC( tviW, tviW ); + goto out; + } else { + VtsID tviR = acc_thr->viR; + VtsID rmini = SVal__unC_Rmin(svOld); + /* assert on sanity of constraints. */ + POrd ordxx = VtsID__getOrdering(rmini,wmini); + tl_assert(ordxx == POrd_EQ || ordxx == POrd_LT); + svNew = MSM_RACE2ERR + ? SVal__mkE() + /* One possibility is, after a race is seen, to + set the location's constraints as aggressively + (as far ahead) as possible. However, that just + causes lots more races to be reported, which is + very confusing. Hence don't do this. */ + /* + : SVal__mkC( VtsID__join2(wmini,tviR), + VtsID__join2(wmini,tviW) ); + */ + /* instead, re-set the constraints in a way which + is consistent with (ie, as they would have been + computed anyway) had no race been detected. */ + : SVal__mkC( VtsID__join2(rmini,tviR), + VtsID__join2(wmini,tviW) ); + record_race_info( acc_thr, acc_addr, szB, True/*isWrite*/ ); + goto out; + } + } + if (SVal__isA(svOld)) { + /* writing no-access memory (sigh); leave unchanged */ + /* check for no pollution */ + tl_assert(svOld == SVal_NOACCESS); + svNew = SVal_NOACCESS; + goto out; + } + if (SVal__isE(svOld)) { + /* no race, location is already "in error" */ + svNew = SVal__mkE(); + goto out; + } + VG_(printf)("msm_write: bad svOld: 0x%016llx\n", svOld); + tl_assert(0); + + out: + if (CHECK_MSM) { + tl_assert(is_sane_SVal_C(svNew)); + } + tl_assert(svNew != SVal_INVALID); + if (svNew != svOld && HG_(clo_show_conflicts)) { + if (SVal__isC(svOld) && SVal__isC(svNew)) { + event_map_bind( acc_addr, szB, True/*isWrite*/, acc_thr ); + stats__msm_write_change++; + } + } + return svNew; +} + + +///////////////////////////////////////////////////////// +// // +// Apply core MSM to specific memory locations // +// // +///////////////////////////////////////////////////////// + +/*------------- ZSM accesses: 8 bit apply ------------- */ + +void zsm_apply8___msm_read ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno, toff; + SVal svOld, svNew; + UShort descr; + stats__cline_read8s++; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0 .. 7 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_8_0 << toff)) )) { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_8(tree, toff, descr); + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + svOld = cl->svals[cloff]; + svNew = msm_read( svOld, thr,a,1 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; +} + +void zsm_apply8___msm_write ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno, toff; + SVal svOld, svNew; + UShort descr; + stats__cline_read8s++; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0 .. 7 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_8_0 << toff)) )) { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_8(tree, toff, descr); + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + svOld = cl->svals[cloff]; + svNew = msm_write( svOld, thr,a,1 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; +} + +/*------------- ZSM accesses: 16 bit apply ------------- */ + +void zsm_apply16___msm_read ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno, toff; + SVal svOld, svNew; + UShort descr; + stats__cline_read16s++; + if (UNLIKELY(!aligned16(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0, 2, 4 or 6 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_16_0 << toff)) )) { + if (valid_value_is_below_me_16(descr, toff)) { + goto slowcase; + } else { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_16(tree, toff, descr); + } + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + svOld = cl->svals[cloff]; + svNew = msm_read( svOld, thr,a,2 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; + return; + slowcase: /* misaligned, or must go further down the tree */ + stats__cline_16to8splits++; + zsm_apply8___msm_read( thr, a + 0 ); + zsm_apply8___msm_read( thr, a + 1 ); +} + +void zsm_apply16___msm_write ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno, toff; + SVal svOld, svNew; + UShort descr; + stats__cline_read16s++; + if (UNLIKELY(!aligned16(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0, 2, 4 or 6 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_16_0 << toff)) )) { + if (valid_value_is_below_me_16(descr, toff)) { + goto slowcase; + } else { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_16(tree, toff, descr); + } + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + svOld = cl->svals[cloff]; + svNew = msm_write( svOld, thr,a,2 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; + return; + slowcase: /* misaligned, or must go further down the tree */ + stats__cline_16to8splits++; + zsm_apply8___msm_write( thr, a + 0 ); + zsm_apply8___msm_write( thr, a + 1 ); +} + +/*------------- ZSM accesses: 32 bit apply ------------- */ + +void zsm_apply32___msm_read ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno, toff; + SVal svOld, svNew; + UShort descr; + if (UNLIKELY(!aligned32(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0 or 4 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_32_0 << toff)) )) { + if (valid_value_is_above_me_32(descr, toff)) { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_32(tree, toff, descr); + } else { + goto slowcase; + } + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + svOld = cl->svals[cloff]; + svNew = msm_read( svOld, thr,a,4 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; + return; + slowcase: /* misaligned, or must go further down the tree */ + stats__cline_32to16splits++; + zsm_apply16___msm_read( thr, a + 0 ); + zsm_apply16___msm_read( thr, a + 2 ); +} + +void zsm_apply32___msm_write ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno, toff; + SVal svOld, svNew; + UShort descr; + if (UNLIKELY(!aligned32(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0 or 4 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_32_0 << toff)) )) { + if (valid_value_is_above_me_32(descr, toff)) { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_32(tree, toff, descr); + } else { + goto slowcase; + } + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + svOld = cl->svals[cloff]; + svNew = msm_write( svOld, thr,a,4 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; + return; + slowcase: /* misaligned, or must go further down the tree */ + stats__cline_32to16splits++; + zsm_apply16___msm_write( thr, a + 0 ); + zsm_apply16___msm_write( thr, a + 2 ); +} + +/*------------- ZSM accesses: 64 bit apply ------------- */ + +void zsm_apply64___msm_read ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno; + //UWord toff; + SVal svOld, svNew; + UShort descr; + stats__cline_read64s++; + if (UNLIKELY(!aligned64(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + //toff = get_tree_offset(a); /* == 0, unused */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & TREE_DESCR_64) )) { + goto slowcase; + } + svOld = cl->svals[cloff]; + svNew = msm_read( svOld, thr,a,8 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; + return; + slowcase: /* misaligned, or must go further down the tree */ + stats__cline_64to32splits++; + zsm_apply32___msm_read( thr, a + 0 ); + zsm_apply32___msm_read( thr, a + 4 ); +} + +void zsm_apply64___msm_write ( Thr* thr, Addr a ) { + CacheLine* cl; + UWord cloff, tno; + //UWord toff; + SVal svOld, svNew; + UShort descr; + stats__cline_read64s++; + if (UNLIKELY(!aligned64(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + //toff = get_tree_offset(a); /* == 0, unused */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & TREE_DESCR_64) )) { + goto slowcase; + } + svOld = cl->svals[cloff]; + svNew = msm_write( svOld, thr,a,8 ); + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; + return; + slowcase: /* misaligned, or must go further down the tree */ + stats__cline_64to32splits++; + zsm_apply32___msm_write( thr, a + 0 ); + zsm_apply32___msm_write( thr, a + 4 ); +} + +/*--------------- ZSM accesses: 8 bit write --------------- */ + +static +void zsm_write8 ( Addr a, SVal svNew ) { + CacheLine* cl; + UWord cloff, tno, toff; + UShort descr; + stats__cline_set8s++; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0 .. 7 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_8_0 << toff)) )) { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_8(tree, toff, descr); + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff] = svNew; +} + +/*--------------- ZSM accesses: 16 bit write --------------- */ + +static +void zsm_write16 ( Addr a, SVal svNew ) { + CacheLine* cl; + UWord cloff, tno, toff; + UShort descr; + stats__cline_set16s++; + if (UNLIKELY(!aligned16(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0, 2, 4 or 6 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_16_0 << toff)) )) { + if (valid_value_is_below_me_16(descr, toff)) { + /* Writing at this level. Need to fix up 'descr'. */ + cl->descrs[tno] = pullup_descr_to_16(descr, toff); + /* At this point, the tree does not match cl->descr[tno] any + more. The assignments below will fix it up. */ + } else { + /* We can't indiscriminately write on the w16 node as in the + w64 case, as that might make the node inconsistent with + its parent. So first, pull down to this level. */ + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_16(tree, toff, descr); + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } + } + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff + 0] = svNew; + cl->svals[cloff + 1] = SVal_INVALID; + return; + slowcase: /* misaligned */ + stats__cline_16to8splits++; + zsm_write8( a + 0, svNew ); + zsm_write8( a + 1, svNew ); +} + +/*--------------- ZSM accesses: 32 bit write --------------- */ + +static +void zsm_write32 ( Addr a, SVal svNew ) { + CacheLine* cl; + UWord cloff, tno, toff; + UShort descr; + stats__cline_set32s++; + if (UNLIKELY(!aligned32(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0 or 4 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_32_0 << toff)) )) { + if (valid_value_is_above_me_32(descr, toff)) { + /* We can't indiscriminately write on the w32 node as in the + w64 case, as that might make the node inconsistent with + its parent. So first, pull down to this level. */ + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_32(tree, toff, descr); + if (CHECK_ZSM) + tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */ + } else { + /* Writing at this level. Need to fix up 'descr'. */ + cl->descrs[tno] = pullup_descr_to_32(descr, toff); + /* At this point, the tree does not match cl->descr[tno] any + more. The assignments below will fix it up. */ + } + } + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff + 0] = svNew; + cl->svals[cloff + 1] = SVal_INVALID; + cl->svals[cloff + 2] = SVal_INVALID; + cl->svals[cloff + 3] = SVal_INVALID; + return; + slowcase: /* misaligned */ + stats__cline_32to16splits++; + zsm_write16( a + 0, svNew ); + zsm_write16( a + 2, svNew ); +} + +/*--------------- ZSM accesses: 64 bit write --------------- */ + +static +void zsm_write64 ( Addr a, SVal svNew ) { + CacheLine* cl; + UWord cloff, tno; + //UWord toff; + stats__cline_set64s++; + if (UNLIKELY(!aligned64(a))) goto slowcase; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + //toff = get_tree_offset(a); /* == 0, unused */ + cl->descrs[tno] = TREE_DESCR_64; + tl_assert(svNew != SVal_INVALID); + cl->svals[cloff + 0] = svNew; + cl->svals[cloff + 1] = SVal_INVALID; + cl->svals[cloff + 2] = SVal_INVALID; + cl->svals[cloff + 3] = SVal_INVALID; + cl->svals[cloff + 4] = SVal_INVALID; + cl->svals[cloff + 5] = SVal_INVALID; + cl->svals[cloff + 6] = SVal_INVALID; + cl->svals[cloff + 7] = SVal_INVALID; + return; + slowcase: /* misaligned */ + stats__cline_64to32splits++; + zsm_write32( a + 0, svNew ); + zsm_write32( a + 4, svNew ); +} + +/*------------- ZSM accesses: 8 bit read/copy ------------- */ + +static +SVal zsm_read8 ( Addr a ) { + CacheLine* cl; + UWord cloff, tno, toff; + UShort descr; + stats__cline_get8s++; + cl = get_cacheline(a); + cloff = get_cacheline_offset(a); + tno = get_treeno(a); + toff = get_tree_offset(a); /* == 0 .. 7 */ + descr = cl->descrs[tno]; + if (UNLIKELY( !(descr & (TREE_DESCR_8_0 << toff)) )) { + SVal* tree = &cl->svals[tno << 3]; + cl->descrs[tno] = pulldown_to_8(tree, toff, descr); + } + return cl->svals[cloff]; +} + +static void zsm_copy8 ( Addr src, Addr dst, Bool uu_normalise ) { + SVal sv; + stats__cline_copy8s++; + sv = zsm_read8( src ); + zsm_write8( dst, sv ); +} + +/* ------------ Shadow memory range setting ops ------------ */ + +void zsm_apply_range___msm_read ( Thr* thr, + Addr a, SizeT len ) +{ + /* fast track a couple of common cases */ + if (len == 4 && aligned32(a)) { + zsm_apply32___msm_read( thr, a ); + return; + } + if (len == 8 && aligned64(a)) { + zsm_apply64___msm_read( thr, a ); + return; + } + + /* be completely general (but as efficient as possible) */ + if (len == 0) return; + + if (!aligned16(a) && len >= 1) { + zsm_apply8___msm_read( thr, a ); + a += 1; + len -= 1; + tl_assert(aligned16(a)); + } + if (len == 0) return; + + if (!aligned32(a) && len >= 2) { + zsm_apply16___msm_read( thr, a ); + a += 2; + len -= 2; + tl_assert(aligned32(a)); + } + if (len == 0) return; + + if (!aligned64(a) && len >= 4) { + zsm_apply32___msm_read( thr, a ); + a += 4; + len -= 4; + tl_assert(aligned64(a)); + } + if (len == 0) return; + + if (len >= 8) { + tl_assert(aligned64(a)); + while (len >= 8) { + zsm_apply64___msm_read( thr, a ); + a += 8; + len -= 8; + } + tl_assert(aligned64(a)); + } + if (len == 0) return; + + if (len >= 4) + tl_assert(aligned32(a)); + if (len >= 4) { + zsm_apply32___msm_read( thr, a ); + a += 4; + len -= 4; + } + if (len == 0) return; + + if (len >= 2) + tl_assert(aligned16(a)); + if (len >= 2) { + zsm_apply16___msm_read( thr, a ); + a += 2; + len -= 2; + } + if (len == 0) return; + + if (len >= 1) { + zsm_apply8___msm_read( thr, a ); + //a += 1; + len -= 1; + } + tl_assert(len == 0); +} + + + +void zsm_apply_range___msm_write ( Thr* thr, + Addr a, SizeT len ) +{ + /* fast track a couple of common cases */ + if (len == 4 && aligned32(a)) { + zsm_apply32___msm_write( thr, a ); + return; + } + if (len == 8 && aligned64(a)) { + zsm_apply64___msm_write( thr, a ); + return; + } + + /* be completely general (but as efficient as possible) */ + if (len == 0) return; + + if (!aligned16(a) && len >= 1) { + zsm_apply8___msm_write( thr, a ); + a += 1; + len -= 1; + tl_assert(aligned16(a)); + } + if (len == 0) return; + + if (!aligned32(a) && len >= 2) { + zsm_apply16___msm_write( thr, a ); + a += 2; + len -= 2; + tl_assert(aligned32(a)); + } + if (len == 0) return; + + if (!aligned64(a) && len >= 4) { + zsm_apply32___msm_write( thr, a ); + a += 4; + len -= 4; + tl_assert(aligned64(a)); + } + if (len == 0) return; + + if (len >= 8) { + tl_assert(aligned64(a)); + while (len >= 8) { + zsm_apply64___msm_write( thr, a ); + a += 8; + len -= 8; + } + tl_assert(aligned64(a)); + } + if (len == 0) return; + + if (len >= 4) + tl_assert(aligned32(a)); + if (len >= 4) { + zsm_apply32___msm_write( thr, a ); + a += 4; + len -= 4; + } + if (len == 0) return; + + if (len >= 2) + tl_assert(aligned16(a)); + if (len >= 2) { + zsm_apply16___msm_write( thr, a ); + a += 2; + len -= 2; + } + if (len == 0) return; + + if (len >= 1) { + zsm_apply8___msm_write( thr, a ); + //a += 1; + len -= 1; + } + tl_assert(len == 0); +} + + + + +/* Block-copy states (needed for implementing realloc()). */ + +static void zsm_copy_range ( Addr src, Addr dst, SizeT len ) +{ + SizeT i; + if (len == 0) + return; + + /* assert for non-overlappingness */ + tl_assert(src+len <= dst || dst+len <= src); + + /* To be simple, just copy byte by byte. But so as not to wreck + performance for later accesses to dst[0 .. len-1], normalise + destination lines as we finish with them, and also normalise the + line containing the first and last address. */ + for (i = 0; i < len; i++) { + Bool normalise + = get_cacheline_offset( dst+i+1 ) == 0 /* last in line */ + || i == 0 /* first in range */ + || i == len-1; /* last in range */ + zsm_copy8( src+i, dst+i, normalise ); + } +} + + +/* For setting address ranges to a given value. Has considerable + sophistication so as to avoid generating large numbers of pointless + cache loads/writebacks for large ranges. */ + +/* Do small ranges in-cache, in the obvious way. */ +static +void zsm_set_range_SMALL ( Addr a, SizeT len, SVal svNew ) +{ + /* fast track a couple of common cases */ + if (len == 4 && aligned32(a)) { + zsm_write32( a, svNew ); + return; + } + if (len == 8 && aligned64(a)) { + zsm_write64( a, svNew ); + return; + } + + /* be completely general (but as efficient as possible) */ + if (len == 0) return; + + if (!aligned16(a) && len >= 1) { + zsm_write8( a, svNew ); + a += 1; + len -= 1; + tl_assert(aligned16(a)); + } + if (len == 0) return; + + if (!aligned32(a) && len >= 2) { + zsm_write16( a, svNew ); + a += 2; + len -= 2; + tl_assert(aligned32(a)); + } + if (len == 0) return; + + if (!aligned64(a) && len >= 4) { + zsm_write32( a, svNew ); + a += 4; + len -= 4; + tl_assert(aligned64(a)); + } + if (len == 0) return; + + if (len >= 8) { + tl_assert(aligned64(a)); + while (len >= 8) { + zsm_write64( a, svNew ); + a += 8; + len -= 8; + } + tl_assert(aligned64(a)); + } + if (len == 0) return; + + if (len >= 4) + tl_assert(aligned32(a)); + if (len >= 4) { + zsm_write32( a, svNew ); + a += 4; + len -= 4; + } + if (len == 0) return; + + if (len >= 2) + tl_assert(aligned16(a)); + if (len >= 2) { + zsm_write16( a, svNew ); + a += 2; + len -= 2; + } + if (len == 0) return; + + if (len >= 1) { + zsm_write8( a, svNew ); + //a += 1; + len -= 1; + } + tl_assert(len == 0); +} + + +/* If we're doing a small range, hand off to zsm_set_range_SMALL. But + for larger ranges, try to operate directly on the out-of-cache + representation, rather than dragging lines into the cache, + overwriting them, and forcing them out. This turns out to be an + important performance optimisation. */ + +static void zsm_set_range ( Addr a, SizeT len, SVal svNew ) +{ + tl_assert(svNew != SVal_INVALID); + stats__cache_make_New_arange += (ULong)len; + + if (0 && len > 500) + VG_(printf)("make New ( %#lx, %ld )\n", a, len ); + + if (0) { + static UWord n_New_in_cache = 0; + static UWord n_New_not_in_cache = 0; + /* tag is 'a' with the in-line offset masked out, + eg a[31]..a[4] 0000 */ + Addr tag = a & ~(N_LINE_ARANGE - 1); + UWord wix = (a >> N_LINE_BITS) & (N_WAY_NENT - 1); + if (LIKELY(tag == cache_shmem.tags0[wix])) { + n_New_in_cache++; + } else { + n_New_not_in_cache++; + } + if (0 == ((n_New_in_cache + n_New_not_in_cache) % 100000)) + VG_(printf)("shadow_mem_make_New: IN %lu OUT %lu\n", + n_New_in_cache, n_New_not_in_cache ); + } + + if (LIKELY(len < 2 * N_LINE_ARANGE)) { + zsm_set_range_SMALL( a, len, svNew ); + } else { + Addr before_start = a; + Addr aligned_start = cacheline_ROUNDUP(a); + Addr after_start = cacheline_ROUNDDN(a + len); + UWord before_len = aligned_start - before_start; + UWord aligned_len = after_start - aligned_start; + UWord after_len = a + len - after_start; + tl_assert(before_start <= aligned_start); + tl_assert(aligned_start <= after_start); + tl_assert(before_len < N_LINE_ARANGE); + tl_assert(after_len < N_LINE_ARANGE); + tl_assert(get_cacheline_offset(aligned_start) == 0); + if (get_cacheline_offset(a) == 0) { + tl_assert(before_len == 0); + tl_assert(a == aligned_start); + } + if (get_cacheline_offset(a+len) == 0) { + tl_assert(after_len == 0); + tl_assert(after_start == a+len); + } + if (before_len > 0) { + zsm_set_range_SMALL( before_start, before_len, svNew ); + } + if (after_len > 0) { + zsm_set_range_SMALL( after_start, after_len, svNew ); + } + stats__cache_make_New_inZrep += (ULong)aligned_len; + + while (1) { + Addr tag; + UWord wix; + if (aligned_start >= after_start) + break; + tl_assert(get_cacheline_offset(aligned_start) == 0); + tag = aligned_start & ~(N_LINE_ARANGE - 1); + wix = (aligned_start >> N_LINE_BITS) & (N_WAY_NENT - 1); + if (tag == cache_shmem.tags0[wix]) { + UWord i; + for (i = 0; i < N_LINE_ARANGE / 8; i++) + zsm_write64( aligned_start + i * 8, svNew ); + } else { + UWord i; + Word zix; + SecMap* sm; + LineZ* lineZ; + /* This line is not in the cache. Do not force it in; instead + modify it in-place. */ + /* find the Z line to write in and rcdec it or the + associated F line. */ + find_Z_for_writing( &sm, &zix, tag ); + tl_assert(sm); + tl_assert(zix >= 0 && zix < N_SECMAP_ZLINES); + lineZ = &sm->linesZ[zix]; + lineZ->dict[0] = svNew; + lineZ->dict[1] = lineZ->dict[2] = lineZ->dict[3] = SVal_INVALID; + for (i = 0; i < N_LINE_ARANGE/4; i++) + lineZ->ix2s[i] = 0; /* all refer to dict[0] */ + rcinc_LineZ(lineZ); + } + aligned_start += N_LINE_ARANGE; + aligned_len -= N_LINE_ARANGE; + } + tl_assert(aligned_start == after_start); + tl_assert(aligned_len == 0); + } +} + + +///////////////////////////////////////////////////////// +// // +// Synchronisation objects // +// // +///////////////////////////////////////////////////////// + +// (UInt) `echo "Synchronisation object" | md5sum` +#define SO_MAGIC 0x56b3c5b0U + +struct _SO { + VtsID viR; /* r-clock of sender */ + VtsID viW; /* w-clock of sender */ + UInt magic; +}; + +static SO* SO__Alloc ( void ) { + SO* so = HG_(zalloc)( "libhb.SO__Alloc.1", sizeof(SO) ); + so->viR = VtsID_INVALID; + so->viW = VtsID_INVALID; + so->magic = SO_MAGIC; + return so; +} +static void SO__Dealloc ( SO* so ) { + tl_assert(so); + tl_assert(so->magic == SO_MAGIC); + if (so->viR == VtsID_INVALID) { + tl_assert(so->viW == VtsID_INVALID); + } else { + tl_assert(so->viW != VtsID_INVALID); + VtsID__rcdec(so->viR); + VtsID__rcdec(so->viW); + } + so->magic = 0; + HG_(free)( so ); +} + + +///////////////////////////////////////////////////////// +// // +// Top Level API // +// // +///////////////////////////////////////////////////////// + +static void show_thread_state ( HChar* str, Thr* t ) +{ + if (1) return; + if (t->viR == t->viW) { + VG_(printf)("thr \"%s\" %p has vi* %u==", str, t, t->viR ); + VtsID__pp( t->viR ); + VG_(printf)("%s","\n"); + } else { + VG_(printf)("thr \"%s\" %p has viR %u==", str, t, t->viR ); + VtsID__pp( t->viR ); + VG_(printf)(" viW %u==", t->viW); + VtsID__pp( t->viW ); + VG_(printf)("%s","\n"); + } +} + + +Thr* libhb_init ( + void (*get_stacktrace)( Thr*, Addr*, UWord ), + ExeContext* (*get_EC)( Thr* ) + ) +{ + Thr* thr; + VtsID vi; + tl_assert(get_stacktrace); + tl_assert(get_EC); + main_get_stacktrace = get_stacktrace; + main_get_EC = get_EC; + + // No need to initialise hg_wordfm. + // No need to initialise hg_wordset. + + vts_set_init(); + vts_tab_init(); + event_map_init(); + VtsID__invalidate_caches(); + + // initialise shadow memory + zsm_init( SVal__rcinc, SVal__rcdec ); + + thr = Thr__new(); + vi = VtsID__mk_Singleton( thr, 1 ); + thr->viR = vi; + thr->viW = vi; + VtsID__rcinc(thr->viR); + VtsID__rcinc(thr->viW); + + show_thread_state(" root", thr); + return thr; +} + +Thr* libhb_create ( Thr* parent ) +{ + /* The child's VTSs are copies of the parent's VTSs, but ticked at + the child's index. Since the child's index is guaranteed + unique, it has never been seen before, so the implicit value + before the tick is zero and after that is one. */ + Thr* child = Thr__new(); + + child->viR = VtsID__tick( parent->viR, child ); + child->viW = VtsID__tick( parent->viW, child ); + VtsID__rcinc(child->viR); + VtsID__rcinc(child->viW); + + tl_assert(VtsID__indexAt( child->viR, child ) == 1); + tl_assert(VtsID__indexAt( child->viW, child ) == 1); + + /* and the parent has to move along too */ + VtsID__rcdec(parent->viR); + VtsID__rcdec(parent->viW); + parent->viR = VtsID__tick( parent->viR, parent ); + parent->viW = VtsID__tick( parent->viW, parent ); + VtsID__rcinc(parent->viR); + VtsID__rcinc(parent->viW); + + show_thread_state(" child", child); + show_thread_state("parent", parent); + + return child; +} + +/* Shut down the library, and print stats (in fact that's _all_ + this is for. */ +void libhb_shutdown ( Bool show_stats ) +{ + if (show_stats) { + VG_(printf)("%s","<<< BEGIN libhb stats >>>\n"); + VG_(printf)(" secmaps: %'10lu allocd (%'12lu g-a-range)\n", + stats__secmaps_allocd, + stats__secmap_ga_space_covered); + VG_(printf)(" linesZ: %'10lu allocd (%'12lu bytes occupied)\n", + stats__secmap_linesZ_allocd, + stats__secmap_linesZ_bytes); + VG_(printf)(" linesF: %'10lu allocd (%'12lu bytes occupied)\n", + stats__secmap_linesF_allocd, + stats__secmap_linesF_bytes); + VG_(printf)(" secmaps: %'10lu iterator steppings\n", + stats__secmap_iterator_steppings); + VG_(printf)(" secmaps: %'10lu searches (%'12lu slow)\n", + stats__secmaps_search, stats__secmaps_search_slow); + + VG_(printf)("%s","\n"); + VG_(printf)(" cache: %'lu totrefs (%'lu misses)\n", + stats__cache_totrefs, stats__cache_totmisses ); + VG_(printf)(" cache: %'14lu Z-fetch, %'14lu F-fetch\n", + stats__cache_Z_fetches, stats__cache_F_fetches ); + VG_(printf)(" cache: %'14lu Z-wback, %'14lu F-wback\n", + stats__cache_Z_wbacks, stats__cache_F_wbacks ); + VG_(printf)(" cache: %'14lu invals, %'14lu flushes\n", + stats__cache_invals, stats__cache_flushes ); + VG_(printf)(" cache: %'14llu arange_New %'14llu direct-to-Zreps\n", + stats__cache_make_New_arange, + stats__cache_make_New_inZrep); + + VG_(printf)("%s","\n"); + VG_(printf)(" cline: %'10lu normalises\n", + stats__cline_normalises ); + VG_(printf)(" cline: rds 8/4/2/1: %'13lu %'13lu %'13lu %'13lu\n", + stats__cline_read64s, + stats__cline_read32s, + stats__cline_read16s, + stats__cline_read8s ); + VG_(printf)(" cline: wrs 8/4/2/1: %'13lu %'13lu %'13lu %'13lu\n", + stats__cline_write64s, + stats__cline_write32s, + stats__cline_write16s, + stats__cline_write8s ); + VG_(printf)(" cline: sets 8/4/2/1: %'13lu %'13lu %'13lu %'13lu\n", + stats__cline_set64s, + stats__cline_set32s, + stats__cline_set16s, + stats__cline_set8s ); + VG_(printf)(" cline: get1s %'lu, copy1s %'lu\n", + stats__cline_get8s, stats__cline_copy8s ); + VG_(printf)(" cline: splits: 8to4 %'12lu 4to2 %'12lu 2to1 %'12lu\n", + stats__cline_64to32splits, + stats__cline_32to16splits, + stats__cline_16to8splits ); + VG_(printf)(" cline: pulldowns: 8to4 %'12lu 4to2 %'12lu 2to1 %'12lu\n", + stats__cline_64to32pulldown, + stats__cline_32to16pulldown, + stats__cline_16to8pulldown ); + if (0) + VG_(printf)(" cline: sizeof(CacheLineZ) %ld, covers %ld bytes of arange\n", + (Word)sizeof(LineZ), (Word)N_LINE_ARANGE); + + VG_(printf)("%s","\n"); + + VG_(printf)(" libhb: %'13llu msm_read (%'llu changed)\n", + stats__msm_read, stats__msm_read_change); + VG_(printf)(" libhb: %'13llu msm_write (%'llu changed)\n", + stats__msm_write, stats__msm_write_change); + VG_(printf)(" libhb: %'13llu getOrd queries (%'llu misses)\n", + stats__getOrdering_queries, stats__getOrdering_misses); + VG_(printf)(" libhb: %'13llu join2 queries (%'llu misses)\n", + stats__join2_queries, stats__join2_misses); + + VG_(printf)("%s","\n"); + VG_(printf)( + " libhb: %ld entries in vts_table (approximately %lu bytes)\n", + VG_(sizeXA)( vts_tab ), VG_(sizeXA)( vts_tab ) * sizeof(VtsTE) + ); + VG_(printf)( " libhb: %lu entries in vts_set\n", + VG_(sizeFM)( vts_set ) ); + + VG_(printf)("%s","\n"); + VG_(printf)( " libhb: ctxt__rcdec: 1=%lu(%lu eq), 2=%lu, 3=%lu\n", + stats__ctxt_rcdec1, stats__ctxt_rcdec1_eq, + stats__ctxt_rcdec2, + stats__ctxt_rcdec3 ); + VG_(printf)( " libhb: ctxt__rcdec: calls %lu, discards %lu\n", + stats__ctxt_rcdec_calls, stats__ctxt_rcdec_discards); + VG_(printf)( " libhb: contextTab: %lu slots, %lu max ents\n", + (UWord)N_RCEC_TAB, + stats__ctxt_tab_curr ); + VG_(printf)( " libhb: contextTab: %lu queries, %lu cmps\n", + stats__ctxt_tab_qs, + stats__ctxt_tab_cmps ); +#if 0 + VG_(printf)("sizeof(AvlNode) = %lu\n", sizeof(AvlNode)); + VG_(printf)("sizeof(WordBag) = %lu\n", sizeof(WordBag)); + VG_(printf)("sizeof(MaybeWord) = %lu\n", sizeof(MaybeWord)); + VG_(printf)("sizeof(CacheLine) = %lu\n", sizeof(CacheLine)); + VG_(printf)("sizeof(LineZ) = %lu\n", sizeof(LineZ)); + VG_(printf)("sizeof(LineF) = %lu\n", sizeof(LineF)); + VG_(printf)("sizeof(SecMap) = %lu\n", sizeof(SecMap)); + VG_(printf)("sizeof(Cache) = %lu\n", sizeof(Cache)); + VG_(printf)("sizeof(SMCacheEnt) = %lu\n", sizeof(SMCacheEnt)); + VG_(printf)("sizeof(CountedSVal) = %lu\n", sizeof(CountedSVal)); + VG_(printf)("sizeof(VTS) = %lu\n", sizeof(VTS)); + VG_(printf)("sizeof(ScalarTS) = %lu\n", sizeof(ScalarTS)); + VG_(printf)("sizeof(VtsTE) = %lu\n", sizeof(VtsTE)); + VG_(printf)("sizeof(MSMInfo) = %lu\n", sizeof(MSMInfo)); + + VG_(printf)("sizeof(struct _XArray) = %lu\n", sizeof(struct _XArray)); + VG_(printf)("sizeof(struct _WordFM) = %lu\n", sizeof(struct _WordFM)); + VG_(printf)("sizeof(struct _Thr) = %lu\n", sizeof(struct _Thr)); + VG_(printf)("sizeof(struct _SO) = %lu\n", sizeof(struct _SO)); +#endif + + VG_(printf)("%s","<<< END libhb stats >>>\n"); + VG_(printf)("%s","\n"); + + } +} + +void libhb_async_exit ( Thr* thr ) +{ + /* is there anything we need to do? */ +} + +/* Both Segs and SOs point to VTSs. However, there is no sharing, so + a Seg that points at a VTS is its one-and-only owner, and ditto for + a SO that points at a VTS. */ + +SO* libhb_so_alloc ( void ) +{ + return SO__Alloc(); +} + +void libhb_so_dealloc ( SO* so ) +{ + tl_assert(so); + tl_assert(so->magic == SO_MAGIC); + SO__Dealloc(so); +} + +/* See comments in libhb.h for details on the meaning of + strong vs weak sends and strong vs weak receives. */ +void libhb_so_send ( Thr* thr, SO* so, Bool strong_send ) +{ + /* Copy the VTSs from 'thr' into the sync object, and then move + the thread along one step. */ + + tl_assert(so); + tl_assert(so->magic == SO_MAGIC); + + /* stay sane .. a thread's read-clock must always lead or be the + same as its write-clock */ + { POrd ord = VtsID__getOrdering(thr->viW, thr->viR); + tl_assert(ord == POrd_EQ || ord == POrd_LT); + } + + /* since we're overwriting the VtsIDs in the SO, we need to drop + any references made by the previous contents thereof */ + if (so->viR == VtsID_INVALID) { + tl_assert(so->viW == VtsID_INVALID); + so->viR = thr->viR; + so->viW = thr->viW; + VtsID__rcinc(so->viR); + VtsID__rcinc(so->viW); + } else { + /* In a strong send, we dump any previous VC in the SO and + install the sending thread's VC instead. For a weak send we + must join2 with what's already there. */ + tl_assert(so->viW != VtsID_INVALID); + VtsID__rcdec(so->viR); + VtsID__rcdec(so->viW); + so->viR = strong_send ? thr->viR : VtsID__join2( so->viR, thr->viR ); + so->viW = strong_send ? thr->viW : VtsID__join2( so->viW, thr->viW ); + VtsID__rcinc(so->viR); + VtsID__rcinc(so->viW); + } + + /* move both parent clocks along */ + VtsID__rcdec(thr->viR); + VtsID__rcdec(thr->viW); + thr->viR = VtsID__tick( thr->viR, thr ); + thr->viW = VtsID__tick( thr->viW, thr ); + VtsID__rcinc(thr->viR); + VtsID__rcinc(thr->viW); + if (strong_send) + show_thread_state("s-send", thr); + else + show_thread_state("w-send", thr); +} + +void libhb_so_recv ( Thr* thr, SO* so, Bool strong_recv ) +{ + tl_assert(so); + tl_assert(so->magic == SO_MAGIC); + + if (so->viR != VtsID_INVALID) { + tl_assert(so->viW != VtsID_INVALID); + + /* Weak receive (basically, an R-acquisition of a R-W lock). + This advances the read-clock of the receiver, but not the + write-clock. */ + VtsID__rcdec(thr->viR); + thr->viR = VtsID__join2( thr->viR, so->viR ); + VtsID__rcinc(thr->viR); + + /* For a strong receive, we also advance the receiver's write + clock, which means the receive as a whole is essentially + equivalent to a W-acquisition of a R-W lock. */ + if (strong_recv) { + VtsID__rcdec(thr->viW); + thr->viW = VtsID__join2( thr->viW, so->viW ); + VtsID__rcinc(thr->viW); + } + + if (strong_recv) + show_thread_state("s-recv", thr); + else + show_thread_state("w-recv", thr); + + } else { + tl_assert(so->viW == VtsID_INVALID); + /* Deal with degenerate case: 'so' has no vts, so there has been + no message posted to it. Just ignore this case. */ + show_thread_state("d-recv", thr); + } +} + +Bool libhb_so_everSent ( SO* so ) +{ + if (so->viR == VtsID_INVALID) { + tl_assert(so->viW == VtsID_INVALID); + return False; + } else { + tl_assert(so->viW != VtsID_INVALID); + return True; + } +} + +#define XXX1 0 // 0x67a106c +#define XXX2 0 + +static Bool TRACEME(Addr a, SizeT szB) { + if (XXX1 && a <= XXX1 && XXX1 <= a+szB) return True; + if (XXX2 && a <= XXX2 && XXX2 <= a+szB) return True; + return False; +} +static void trace ( Thr* thr, Addr a, SizeT szB, HChar* s ) { + SVal sv = zsm_read8(a); + VG_(printf)("thr %p (%#lx,%lu) %s: 0x%016llx ", thr,a,szB,s,sv); + show_thread_state("", thr); + VG_(printf)("%s","\n"); +} + +void libhb_range_new ( Thr* thr, Addr a, SizeT szB ) +{ + SVal sv = SVal__mkC(thr->viW, thr->viW); + tl_assert(is_sane_SVal_C(sv)); + if(TRACEME(a,szB))trace(thr,a,szB,"nw-before"); + zsm_set_range( a, szB, sv ); + if(TRACEME(a,szB))trace(thr,a,szB,"nw-after "); +} + +void libhb_range_noaccess ( Thr* thr, Addr a, SizeT szB ) +{ + if(TRACEME(a,szB))trace(thr,a,szB,"NA-before"); + zsm_set_range( a, szB, SVal__mkA() ); + if(TRACEME(a,szB))trace(thr,a,szB,"NA-after "); +} + +void* libhb_get_Thr_opaque ( Thr* thr ) { + tl_assert(thr); + return thr->opaque; +} + +void libhb_set_Thr_opaque ( Thr* thr, void* v ) { + tl_assert(thr); + thr->opaque = v; +} + +void libhb_copy_shadow_state ( Addr dst, Addr src, SizeT len ) +{ + zsm_copy_range(dst, src, len); +} + +void libhb_maybe_GC ( void ) +{ + event_map_maybe_GC(); + /* If there are still freelist entries available, no need for a + GC. */ + if (vts_tab_freelist != VtsID_INVALID) + return; + /* So all the table entries are full, and we're having to expand + the table. But did we hit the threshhold point yet? */ + if (VG_(sizeXA)( vts_tab ) < vts_next_GC_at) + return; + vts_tab__do_GC( False/*don't show stats*/ ); +} + + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +// // +// SECTION END main library // +// // +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + +/*--------------------------------------------------------------------*/ +/*--- end libhb_main.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/helgrind/tests/.deps/bar_bad.Po b/helgrind/tests/.deps/bar_bad.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/bar_bad.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/bar_trivial.Po b/helgrind/tests/.deps/bar_trivial.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/bar_trivial.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/hg01_all_ok.Po b/helgrind/tests/.deps/hg01_all_ok.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/hg01_all_ok.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/hg02_deadlock.Po b/helgrind/tests/.deps/hg02_deadlock.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/hg02_deadlock.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/hg03_inherit.Po b/helgrind/tests/.deps/hg03_inherit.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/hg03_inherit.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/hg04_race.Po b/helgrind/tests/.deps/hg04_race.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/hg04_race.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/hg05_race2.Po b/helgrind/tests/.deps/hg05_race2.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/hg05_race2.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/hg06_readshared.Po b/helgrind/tests/.deps/hg06_readshared.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/hg06_readshared.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc01_simple_race.Po b/helgrind/tests/.deps/tc01_simple_race.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc01_simple_race.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc02_simple_tls.Po b/helgrind/tests/.deps/tc02_simple_tls.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc02_simple_tls.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc03_re_excl.Po b/helgrind/tests/.deps/tc03_re_excl.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc03_re_excl.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc04_free_lock.Po b/helgrind/tests/.deps/tc04_free_lock.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc04_free_lock.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc05_simple_race.Po b/helgrind/tests/.deps/tc05_simple_race.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc05_simple_race.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc06_two_races.Po b/helgrind/tests/.deps/tc06_two_races.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc06_two_races.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc07_hbl1.Po b/helgrind/tests/.deps/tc07_hbl1.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc07_hbl1.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc08_hbl2.Po b/helgrind/tests/.deps/tc08_hbl2.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc08_hbl2.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc09_bad_unlock.Po b/helgrind/tests/.deps/tc09_bad_unlock.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc09_bad_unlock.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc10_rec_lock.Po b/helgrind/tests/.deps/tc10_rec_lock.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc10_rec_lock.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc11_XCHG.Po b/helgrind/tests/.deps/tc11_XCHG.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc11_XCHG.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc12_rwl_trivial.Po b/helgrind/tests/.deps/tc12_rwl_trivial.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc12_rwl_trivial.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc13_laog1.Po b/helgrind/tests/.deps/tc13_laog1.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc13_laog1.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc14_laog_dinphils.Po b/helgrind/tests/.deps/tc14_laog_dinphils.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc14_laog_dinphils.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc15_laog_lockdel.Po b/helgrind/tests/.deps/tc15_laog_lockdel.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc15_laog_lockdel.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc16_byterace.Po b/helgrind/tests/.deps/tc16_byterace.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc16_byterace.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc17_sembar.Po b/helgrind/tests/.deps/tc17_sembar.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc17_sembar.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc18_semabuse.Po b/helgrind/tests/.deps/tc18_semabuse.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc18_semabuse.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc19_shadowmem.Po b/helgrind/tests/.deps/tc19_shadowmem.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc19_shadowmem.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc20_verifywrap.Po b/helgrind/tests/.deps/tc20_verifywrap.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc20_verifywrap.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc21_pthonce.Po b/helgrind/tests/.deps/tc21_pthonce.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc21_pthonce.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc22_exit_w_lock.Po b/helgrind/tests/.deps/tc22_exit_w_lock.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc22_exit_w_lock.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc23_bogus_condwait.Po b/helgrind/tests/.deps/tc23_bogus_condwait.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc23_bogus_condwait.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.deps/tc24_nonzero_sem.Po b/helgrind/tests/.deps/tc24_nonzero_sem.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/helgrind/tests/.deps/tc24_nonzero_sem.Po @@ -0,0 +1 @@ +# dummy diff --git a/helgrind/tests/.svn/dir-prop-base b/helgrind/tests/.svn/dir-prop-base new file mode 100644 index 0000000..d2c720a --- /dev/null +++ b/helgrind/tests/.svn/dir-prop-base @@ -0,0 +1,47 @@ +K 10 +svn:ignore +V 571 +*.stderr.diff* +*.stderr.out +*.stdout.diff* +*.stdout.out +.deps +bar_bad +bar_trivial +hg01_all_ok +hg02_deadlock +hg03_inherit +hg04_race +hg05_race2 +hg06_readshared +Makefile +Makefile.in +pth_barrier +rwlock_race +rwlock_test +tc01_simple_race +tc02_simple_tls +tc03_re_excl +tc04_free_lock +tc05_simple_race +tc06_two_races +tc07_hbl1 +tc08_hbl2 +tc09_bad_unlock +tc10_rec_lock +tc11_XCHG +tc12_rwl_trivial +tc13_laog1 +tc14_laog_dinphils +tc15_laog_lockdel +tc16_byterace +tc17_sembar +tc18_semabuse +tc19_shadowmem +tc20_verifywrap +tc21_pthonce +tc22_exit_w_lock +tc23_bogus_condwait +tc24_nonzero_sem + +END diff --git a/helgrind/tests/.svn/entries b/helgrind/tests/.svn/entries new file mode 100644 index 0000000..cfb11cc --- /dev/null +++ b/helgrind/tests/.svn/entries @@ -0,0 +1,1851 @@ +8 + +dir +9703 +svn://svn.valgrind.org/valgrind/trunk/helgrind/tests +svn://svn.valgrind.org/valgrind + + + +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +svn:special svn:externals svn:needs-lock + + + + + + + + + + + +a5019735-40e9-0310-863c-91ae7b9d1cf9 + +pth_barrier2.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +1b7af9f25be03ba7035cf3b4dc849028 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +hg03_inherit.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +952c8f81ac14066719241a1e3999fbc6 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc09_bad_unlock.c +file + + + + +2009-03-13T17:29:59.000000Z +5b6a497779fd9e6f8fee30b6a2d35994 +2008-11-10T00:16:34.266218Z +8753 +sewardj + +tc14_laog_dinphils.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc18_semabuse.c +file + + + + +2009-03-13T17:29:59.000000Z +7cefd95cc7a7e5e1737afb93d58ab1f6 +2008-01-18T07:42:01.157538Z +7354 +sewardj + +tc15_laog_lockdel.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +55775492a6223836247976300f951fcf +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc21_pthonce.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +ab85aa11d9b90e8b7710799cc872cfae +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc17_sembar.c +file + + + + +2009-03-13T17:29:59.000000Z +750229fa2bea226034ae90ce6b31693f +2008-11-09T20:47:57.376987Z +8750 +sewardj + +tc05_simple_race.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +pth_barrier1.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2008-11-14T19:43:44.407535Z +8768 +sewardj + +tc04_free_lock.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +2aa519bbb4b8f0a391d62e78e9614633 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc08_hbl2.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +4c1da2d5aca8d18498b5df846bb6a5e3 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc18_semabuse.stderr.exp-glibc28-amd64 +file + + + + +2009-03-13T17:29:59.000000Z +b015fa006daeab4d27271741a6d67b25 +2008-12-18T20:21:13.504648Z +8842 +sewardj + +tc20_verifywrap.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +6271a0b758842c08406983421e7120e0 +2008-12-21T10:44:28.988809Z +8846 +sewardj + +tc16_byterace.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +d5d6727262759c71223a6cfde614d550 +2008-12-21T10:44:28.988809Z +8846 +sewardj + +tc01_simple_race.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +9632bda9e27a9e5e0c553eeff8b22d10 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +rwlock_race.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2008-11-10T02:01:17.565236Z +8757 +sewardj + +hg04_race.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc02_simple_tls.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc07_hbl1.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +1bbc754ee00f2e2989cf97a1b497eed5 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc19_shadowmem.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +1ed4aad928f0f583dd976290849f8813 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc22_exit_w_lock.c +file + + + + +2009-03-13T17:29:59.000000Z +7cf7d7d72e69af11952e8b45daf1e7a3 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc14_laog_dinphils.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +da11c4d7bf6aa3c703cf82cefbbe9d53 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc01_simple_race.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +7395d893dadd5e0d0e572be7e66313ea +2008-12-21T10:44:28.988809Z +8846 +sewardj + +bar_bad.c +file + + + + +2009-03-13T17:29:59.000000Z +c307252f1cc6a73f35e5f8d4709848ca +2008-11-16T23:25:43.378955Z +8771 +sewardj + +tc09_bad_unlock.stderr.exp-glibc25-amd64 +file + + + + +2009-03-13T17:29:59.000000Z +72283273f1f37f590dd72c180d70fdf0 +2009-03-13T01:41:03.438271Z +9389 +njn + +tc15_laog_lockdel.c +file + + + + +2009-03-13T17:29:59.000000Z +4d0bb9f3b744c804578dccbf8d9e56ed +2008-11-10T16:33:29.938781Z +8761 +sewardj + +tc22_exit_w_lock.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +1ff35de71d8dee6a37c27187df2b3d53 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc19_shadowmem.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +1823331dbc8905bc998a5b744c059bc9 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc04_free_lock.c +file + + + + +2009-03-13T17:29:59.000000Z +960d90bcfffd977c99bad91a7a4690a3 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc10_rec_lock.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +f3d20c3145e6dad7b0ebefe680912005 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc24_nonzero_sem.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-30T11:22:35.839393Z +7254 +sewardj + +rwlock_race.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +27cf9f1f507b5561847d4a5673d1e018 +2009-02-20T19:00:18.724987Z +9206 +bart + +hg02_deadlock.c +file + + + + +2009-03-13T17:29:59.000000Z +2b797898e633ab43252f30bcb9c9aa18 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +filter_stderr +file + + + + +2009-03-13T17:29:59.000000Z +84ff862bf2681b40f86e1dcc14cd774e +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc13_laog1.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc16_byterace.c +file + + + + +2009-03-13T17:29:59.000000Z +0ffbd36fe144af5b98fb00e774acff80 +2008-11-09T20:47:57.376987Z +8750 +sewardj + +hg04_race.c +file + + + + +2009-03-13T17:29:59.000000Z +d5e24fabe302aa1576f12360d33e936c +2007-11-09T22:49:28.769147Z +7116 +sewardj + +hg01_all_ok.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +1bbc754ee00f2e2989cf97a1b497eed5 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc13_laog1.c +file + + + + +2009-03-13T17:29:59.000000Z +c913a1f7c95403e37aa2c4d63812fbdb +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc02_simple_tls.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +fb5bdfc9d1f973c44d1e82ac27365489 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc17_sembar.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc20_verifywrap.stderr.exp-glibc27-amd64 +file + + + + +2009-03-13T17:29:59.000000Z +5d620228838693a99cc36162c3f61b52 +2009-03-13T01:41:03.438271Z +9389 +njn + +tc10_rec_lock.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +f656bdc3b89cb00c8b2d310f985db938 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +hg06_readshared.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +1bbc754ee00f2e2989cf97a1b497eed5 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc12_rwl_trivial.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +13efd0f73e8d898952e067a84d1f70e6 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc10_rec_lock.c +file + + + + +2009-03-13T17:29:59.000000Z +ac5e07711d9f2c7215d139119ff1db4a +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc03_re_excl.c +file + + + + +2009-03-13T17:29:59.000000Z +fb449a56f35b04fa176caae304dd6919 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +hg01_all_ok.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +b6f85650d92ffd2399815f00895c529e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc11_XCHG.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +ae780585f49b94ce1444eb7d28906123 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +hg06_readshared.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +68d0e4db4f9e179451dcee111c52e3c8 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +hg01_all_ok.c +file + + + + +2009-03-13T17:29:59.000000Z +736c44bac02dbe1adbd3177157432a08 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +hg02_deadlock.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc06_two_races.c +file + + + + +2009-03-13T17:29:59.000000Z +8b2a0bbaa6418c408e789da2aee9e567 +2008-11-09T20:47:57.376987Z +8750 +sewardj + +tc09_bad_unlock.stderr.exp-glibc25-x86 +file + + + + +2009-03-13T17:29:59.000000Z +5f3deb329b8755082356f057c5a55ac0 +2009-03-13T01:41:03.438271Z +9389 +njn + +tc20_verifywrap.c +file + + + + +2009-03-13T17:29:59.000000Z +611e104f51cdb0c4077c65e1506950b1 +2008-02-27T15:38:10.186093Z +7488 +bart + +bar_bad.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +050f5cb7aa3c46884e36b1e5db14ba6e +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc13_laog1.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +d5833d4dcf7ced314f5537b37cde5d77 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc09_bad_unlock.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +hg05_race2.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +2c04f1b764316699a2413489e69d5fb3 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +pth_barrier3.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +8205c822fa7c4bf9d72ca058c5c8c46e +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc17_sembar.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +97998a3dee1ecf75ceb80b91c931e688 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc23_bogus_condwait.c +file + + + + +2009-03-13T17:29:59.000000Z +d1be7f31c057c7cccb4d899cefefaf88 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc02_simple_tls.c +file + + + + +2009-03-13T17:29:59.000000Z +4f6f9e3e29fa198f36c02f958915714b +2007-11-09T22:49:28.769147Z +7116 +sewardj + +bar_bad.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +05583b47d2cf0b773f02192da888b82c +2009-01-23T04:14:33.153795Z +9045 +njn + +bar_trivial.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc11_XCHG.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +8ba953ca779ceb61cc07c03096d07cc0 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +rwlock_test.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +e40cdd565bddbe63b9f4c09b5eef3a3e +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +pth_barrier3.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +e94c3652156bfa51eb8e387bc5ba9a4b +2009-02-20T19:00:18.724987Z +9206 +bart + +pth_barrier2.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2008-11-14T19:43:44.407535Z +8768 +sewardj + +hg03_inherit.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc20_verifywrap.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc21_pthonce.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +1904fe10f5ba3740b22997790885897b +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc03_re_excl.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +1bbc754ee00f2e2989cf97a1b497eed5 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc15_laog_lockdel.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +afe627f79faa605150a91f7ed9063096 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc12_rwl_trivial.c +file + + + + +2009-03-13T17:29:59.000000Z +61c66b00c51713c8cfa36059e9207a8b +2007-11-09T22:49:28.769147Z +7116 +sewardj + +bar_trivial.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +f751eb62036941a2b4680662ea2b5ab5 +2009-01-23T04:14:33.153795Z +9045 +njn + +Makefile.am +file + + + + +2009-03-13T17:29:59.000000Z +a7090d578ea05e0c7bf4cbaf89cebc5f +2009-03-13T01:41:03.438271Z +9389 +njn + +rwlock_test.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +b108b7a0943eb853df2209239bd143dc +2009-02-20T19:00:18.724987Z +9206 +bart + +tc06_two_races.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +74b212529d244b78088255109869494b +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc04_free_lock.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +743c0160253e034652b487f22b7e1859 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc08_hbl2.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +1bbc754ee00f2e2989cf97a1b497eed5 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc03_re_excl.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +270857e60a716dc63d27f329e4d63f89 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc01_simple_race.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc16_byterace.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +5cfad24ddce93dcc11c0eca82b619ab8 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc06_two_races.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +8bb1c08864a4ad4f25b3b7485953d5b1 +2008-12-21T10:44:28.988809Z +8846 +sewardj + +pth_barrier2.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +b612884edafdf3a2ff1214388072d664 +2009-02-20T19:00:18.724987Z +9206 +bart + +hg03_inherit.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +35ffa0200144e58808132d35f7b361f1 +2008-12-21T10:44:28.988809Z +8846 +sewardj + +tc07_hbl1.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +3d688704cbbc6753b2002c94a2ad19ac +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc23_bogus_condwait.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +13102baea697869a7c8bed4534cf4b9e +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +hg05_race2.c +file + + + + +2009-03-13T17:29:59.000000Z +f0c347621fc422b53e2cecf02eeefcca +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc19_shadowmem.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc14_laog_dinphils.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +e3e8540154dba3187dc0654835e9a830 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc21_pthonce.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +3fb697bc2dc1118b6852db11b6e00163 +2008-12-21T10:44:28.988809Z +8846 +sewardj + +hg06_readshared.c +file + + + + +2009-03-13T17:29:59.000000Z +99ead17122300c23f7d8b16d00acdd7b +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc24_nonzero_sem.c +file + + + + +2009-03-13T17:29:59.000000Z +9d3744e3220ce9db7e617f933c164ce4 +2007-11-30T11:22:35.839393Z +7254 +sewardj + +tc05_simple_race.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +9b1b44b52f0d628647f1f6db59e4370c +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc23_bogus_condwait.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +4ed1fb2ee954a24999800d5d6cda92df +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc22_exit_w_lock.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +pth_barrier1.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +8205c822fa7c4bf9d72ca058c5c8c46e +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc10_rec_lock.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +rwlock_race.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +e5f4c0b542d48a3371b6d88da06bcd6d +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +hg04_race.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +bf9b2d4dd729b8ba6957d663aab5144f +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc09_bad_unlock.stderr.exp-glibc23-amd64 +file + + + + +2009-03-13T17:29:59.000000Z +fdceb8faf037d8aac64e7d2fecb1ba88 +2009-03-13T01:41:03.438271Z +9389 +njn + +tc05_simple_race.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +b5d8d331bd155f229278b1869134c5dc +2008-12-21T10:44:28.988809Z +8846 +sewardj + +hg01_all_ok.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +pth_barrier1.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +757544d669ba18211e206ed97c55df03 +2009-02-20T19:00:18.724987Z +9206 +bart + +tc07_hbl1.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +e3df442b29e5644823863ebd953b0ed0 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc02_simple_tls.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +1bbc754ee00f2e2989cf97a1b497eed5 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +hg06_readshared.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc12_rwl_trivial.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +hg03_inherit.c +file + + + + +2009-03-13T17:29:59.000000Z +4ac977013a95a7adcf670447732dcff9 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc19_shadowmem.c +file + + + + +2009-03-13T17:29:59.000000Z +69640055b739b0d5535546500d1628e7 +2008-11-09T23:31:19.959310Z +8751 +sewardj + +hg04_race.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +67999332da85e37b5c1d20beeab2c3c8 +2008-12-21T10:44:28.988809Z +8846 +sewardj + +tc22_exit_w_lock.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +2ac71c60d5fccb10dfc48a026b5fe879 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc18_semabuse.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +bar_trivial.c +file + + + + +2009-03-13T17:29:59.000000Z +ce69eb82945c03c7ec1895316be34c91 +2009-03-11T11:09:35.921765Z +9358 +bart + +tc20_verifywrap.stderr.exp-glibc25-amd64 +file + + + + +2009-03-13T17:29:59.000000Z +6c09bec63fea47fb152cc913a7f96862 +2009-03-13T01:41:03.438271Z +9389 +njn + +bar_bad.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2008-11-14T19:43:44.407535Z +8768 +sewardj + +tc24_nonzero_sem.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +1bbc754ee00f2e2989cf97a1b497eed5 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc14_laog_dinphils.c +file + + + + +2009-03-13T17:29:59.000000Z +68686e9e1f6c53f4664837eb44fc0ea0 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc13_laog1.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +9db33b67838f764324c5b3197b6d4674 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +hg05_race2.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc18_semabuse.stderr.exp-glibc25-amd64 +file + + + + +2009-03-13T17:29:59.000000Z +77d2e3a21261d6a78d05791422d52236 +2008-12-19T09:46:17.861280Z +8843 +sewardj + +pth_barrier3.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2008-11-14T19:43:44.407535Z +8768 +sewardj + +tc12_rwl_trivial.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +084016ffe3fdbff6fd81be03f241086d +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc11_XCHG.c +file + + + + +2009-03-13T17:29:59.000000Z +f163d1e7028c0b79b8d930cbf012fe00 +2008-10-21T23:12:56.767079Z +8690 +sewardj + +tc07_hbl1.c +file + + + + +2009-03-13T17:29:59.000000Z +14449d712a12078543754aa1c0ab29a6 +2007-11-27T11:23:55.576946Z +7240 +sewardj + +tc17_sembar.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +fa44c6df49b7eb482bdd88c7c9eed2bd +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc24_nonzero_sem.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +703df4753042085b1989753393caa00f +2007-11-30T11:22:35.839393Z +7254 +sewardj + +bar_trivial.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +3d688704cbbc6753b2002c94a2ad19ac +2008-11-14T19:43:44.407535Z +8768 +sewardj + +rwlock_test.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2008-11-10T02:01:17.565236Z +8757 +sewardj + +tc18_semabuse.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +1c6a60887149d08a73b868a12e8013f2 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc11_XCHG.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +1bbc754ee00f2e2989cf97a1b497eed5 +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +hg02_deadlock.stderr.exp +file + + + + +2009-03-13T17:29:59.000000Z +29810adf964e28b9af0ce938adb5c54e +2009-03-13T01:41:03.438271Z +9389 +njn +has-props + +tc03_re_excl.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc15_laog_lockdel.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +hg05_race2.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +7f590c082f8683cd7d88cc25d686d238 +2008-12-21T10:44:28.988809Z +8846 +sewardj + +tc01_simple_race.c +file + + + + +2009-03-13T17:29:59.000000Z +ee74acc9a7901bf654d7f9c39d27d3d3 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc06_two_races.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc05_simple_race.c +file + + + + +2009-03-13T17:29:59.000000Z +64af75796898373d2d49edcd19e09a70 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc04_free_lock.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +hg02_deadlock.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +6f5475e884257cb4535635a84812463b +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc08_hbl2.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +8cc27649f5b0eee154019e6497272aa1 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc08_hbl2.c +file + + + + +2009-03-13T17:29:59.000000Z +0524f678f4072de39f6a1343f4bbc0e4 +2007-11-27T11:23:55.576946Z +7240 +sewardj + +tc16_byterace.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc21_pthonce.c +file + + + + +2009-03-13T17:29:59.000000Z +723e24d672397a41f139dfa766f46f80 +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc09_bad_unlock.vgtest +file + + + + +2009-03-13T17:29:59.000000Z +9e470acf9d21ca24b0a3e634859a5e3b +2007-11-09T22:49:28.769147Z +7116 +sewardj + +tc23_bogus_condwait.stdout.exp +file + + + + +2009-03-13T17:29:59.000000Z +d41d8cd98f00b204e9800998ecf8427e +2007-11-09T22:49:28.769147Z +7116 +sewardj + diff --git a/helgrind/tests/.svn/format b/helgrind/tests/.svn/format new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/helgrind/tests/.svn/format @@ -0,0 +1 @@ +8 diff --git a/helgrind/tests/.svn/prop-base/bar_bad.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/bar_bad.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/bar_bad.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/bar_trivial.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/bar_trivial.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/bar_trivial.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/filter_stderr.svn-base b/helgrind/tests/.svn/prop-base/filter_stderr.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/filter_stderr.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/helgrind/tests/.svn/prop-base/hg01_all_ok.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/hg01_all_ok.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/hg01_all_ok.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/hg02_deadlock.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/hg02_deadlock.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/hg02_deadlock.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/hg03_inherit.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/hg03_inherit.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/hg03_inherit.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/hg04_race.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/hg04_race.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/hg04_race.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/hg05_race2.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/hg05_race2.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/hg05_race2.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/hg06_readshared.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/hg06_readshared.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/hg06_readshared.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/pth_barrier1.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/pth_barrier1.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/pth_barrier1.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/pth_barrier2.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/pth_barrier2.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/pth_barrier2.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/pth_barrier3.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/pth_barrier3.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/pth_barrier3.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/rwlock_race.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/rwlock_race.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/rwlock_race.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/rwlock_test.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/rwlock_test.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/rwlock_test.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc01_simple_race.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc01_simple_race.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc01_simple_race.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc02_simple_tls.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc02_simple_tls.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc02_simple_tls.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc03_re_excl.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc03_re_excl.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc03_re_excl.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc04_free_lock.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc04_free_lock.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc04_free_lock.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc05_simple_race.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc05_simple_race.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc05_simple_race.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc06_two_races.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc06_two_races.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc06_two_races.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc07_hbl1.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc07_hbl1.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc07_hbl1.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc08_hbl2.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc08_hbl2.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc08_hbl2.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc10_rec_lock.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc10_rec_lock.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc10_rec_lock.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc11_XCHG.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc11_XCHG.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc11_XCHG.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc12_rwl_trivial.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc12_rwl_trivial.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc12_rwl_trivial.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc13_laog1.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc13_laog1.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc13_laog1.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc14_laog_dinphils.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc14_laog_dinphils.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc14_laog_dinphils.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc15_laog_lockdel.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc15_laog_lockdel.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc15_laog_lockdel.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc16_byterace.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc16_byterace.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc16_byterace.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc17_sembar.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc17_sembar.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc17_sembar.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc19_shadowmem.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc19_shadowmem.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc19_shadowmem.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc21_pthonce.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc21_pthonce.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc21_pthonce.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc22_exit_w_lock.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc22_exit_w_lock.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc22_exit_w_lock.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc23_bogus_condwait.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc23_bogus_condwait.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc23_bogus_condwait.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/prop-base/tc24_nonzero_sem.stderr.exp.svn-base b/helgrind/tests/.svn/prop-base/tc24_nonzero_sem.stderr.exp.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/helgrind/tests/.svn/prop-base/tc24_nonzero_sem.stderr.exp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/helgrind/tests/.svn/text-base/Makefile.am.svn-base b/helgrind/tests/.svn/text-base/Makefile.am.svn-base new file mode 100644 index 0000000..f52072f --- /dev/null +++ b/helgrind/tests/.svn/text-base/Makefile.am.svn-base @@ -0,0 +1,108 @@ + +include $(top_srcdir)/Makefile.tool-tests.am + +noinst_SCRIPTS = filter_stderr + +EXTRA_DIST = $(noinst_SCRIPTS) \ + bar_bad.vgtest bar_bad.stdout.exp bar_bad.stderr.exp \ + bar_trivial.vgtest bar_trivial.stdout.exp bar_trivial.stderr.exp \ + hg01_all_ok.vgtest hg01_all_ok.stdout.exp hg01_all_ok.stderr.exp \ + hg02_deadlock.vgtest hg02_deadlock.stdout.exp hg02_deadlock.stderr.exp \ + hg03_inherit.vgtest hg03_inherit.stdout.exp hg03_inherit.stderr.exp \ + hg04_race.vgtest hg04_race.stdout.exp hg04_race.stderr.exp \ + hg05_race2.vgtest hg05_race2.stdout.exp hg05_race2.stderr.exp \ + hg06_readshared.vgtest hg06_readshared.stdout.exp \ + hg06_readshared.stderr.exp \ + pth_barrier1.vgtest pth_barrier1.stdout.exp pth_barrier1.stderr.exp \ + pth_barrier2.vgtest pth_barrier2.stdout.exp pth_barrier2.stderr.exp \ + pth_barrier3.vgtest pth_barrier3.stdout.exp pth_barrier3.stderr.exp \ + rwlock_race.vgtest rwlock_race.stdout.exp rwlock_race.stderr.exp \ + rwlock_test.vgtest rwlock_test.stdout.exp rwlock_test.stderr.exp \ + tc01_simple_race.vgtest tc01_simple_race.stdout.exp \ + tc01_simple_race.stderr.exp \ + tc02_simple_tls.vgtest tc02_simple_tls.stdout.exp \ + tc02_simple_tls.stderr.exp \ + tc03_re_excl.vgtest tc03_re_excl.stdout.exp \ + tc03_re_excl.stderr.exp \ + tc04_free_lock.vgtest tc04_free_lock.stdout.exp \ + tc04_free_lock.stderr.exp \ + tc05_simple_race.vgtest tc05_simple_race.stdout.exp \ + tc05_simple_race.stderr.exp \ + tc06_two_races.vgtest tc06_two_races.stdout.exp \ + tc06_two_races.stderr.exp \ + tc07_hbl1.vgtest tc07_hbl1.stdout.exp tc07_hbl1.stderr.exp \ + tc08_hbl2.vgtest tc08_hbl2.stdout.exp tc08_hbl2.stderr.exp \ + tc09_bad_unlock.vgtest tc09_bad_unlock.stdout.exp \ + tc09_bad_unlock.stderr.exp-glibc23-amd64 \ + tc09_bad_unlock.stderr.exp-glibc25-amd64 \ + tc09_bad_unlock.stderr.exp-glibc25-x86 \ + tc10_rec_lock.vgtest tc10_rec_lock.stdout.exp tc10_rec_lock.stderr.exp \ + tc11_XCHG.vgtest tc11_XCHG.stdout.exp tc11_XCHG.stderr.exp \ + tc12_rwl_trivial.vgtest tc12_rwl_trivial.stdout.exp \ + tc12_rwl_trivial.stderr.exp \ + tc13_laog1.vgtest tc13_laog1.stdout.exp tc13_laog1.stderr.exp \ + tc14_laog_dinphils.vgtest tc14_laog_dinphils.stdout.exp \ + tc14_laog_dinphils.stderr.exp \ + tc15_laog_lockdel.vgtest tc15_laog_lockdel.stdout.exp \ + tc15_laog_lockdel.stderr.exp \ + tc16_byterace.vgtest tc16_byterace.stdout.exp \ + tc16_byterace.stderr.exp \ + tc17_sembar.vgtest tc17_sembar.stdout.exp \ + tc17_sembar.stderr.exp \ + tc18_semabuse.vgtest tc18_semabuse.stdout.exp \ + tc18_semabuse.stderr.exp-glibc25-amd64 \ + tc18_semabuse.stderr.exp-glibc28-amd64 \ + tc19_shadowmem.vgtest tc19_shadowmem.stdout.exp \ + tc19_shadowmem.stderr.exp \ + tc20_verifywrap.vgtest tc20_verifywrap.stdout.exp \ + tc20_verifywrap.stderr.exp-glibc25-amd64 \ + tc20_verifywrap.stderr.exp-glibc27-amd64 \ + tc21_pthonce.vgtest tc21_pthonce.stdout.exp tc21_pthonce.stderr.exp \ + tc22_exit_w_lock.vgtest tc22_exit_w_lock.stdout.exp \ + tc22_exit_w_lock.stderr.exp \ + tc23_bogus_condwait.vgtest tc23_bogus_condwait.stdout.exp \ + tc23_bogus_condwait.stderr.exp \ + tc24_nonzero_sem.vgtest tc24_nonzero_sem.stdout.exp \ + tc24_nonzero_sem.stderr.exp + +check_PROGRAMS = \ + hg01_all_ok \ + hg02_deadlock \ + hg03_inherit \ + hg04_race \ + hg05_race2 \ + hg06_readshared \ + tc01_simple_race \ + tc02_simple_tls \ + tc03_re_excl \ + tc04_free_lock \ + tc05_simple_race \ + tc06_two_races \ + tc07_hbl1 \ + tc08_hbl2 \ + tc09_bad_unlock \ + tc10_rec_lock \ + tc11_XCHG \ + tc12_rwl_trivial \ + tc13_laog1 \ + tc14_laog_dinphils \ + tc15_laog_lockdel \ + tc16_byterace \ + tc17_sembar \ + tc18_semabuse \ + tc19_shadowmem \ + tc20_verifywrap \ + tc21_pthonce \ + tc22_exit_w_lock \ + tc23_bogus_condwait \ + tc24_nonzero_sem + +if HAVE_PTHREAD_BARRIER +check_PROGRAMS += bar_bad bar_trivial +endif + +AM_CFLAGS += $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) + +LDADD = -lpthread + diff --git a/helgrind/tests/.svn/text-base/bar_bad.c.svn-base b/helgrind/tests/.svn/text-base/bar_bad.c.svn-base new file mode 100644 index 0000000..dd6079c --- /dev/null +++ b/helgrind/tests/.svn/text-base/bar_bad.c.svn-base @@ -0,0 +1,89 @@ + +/* This program checks that Helgrind reports the five degenerate + uses of the barrier functions shown. */ +#define _GNU_SOURCE +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <unistd.h> +#include <string.h> + +void* child1 ( void* arg ) +{ + pthread_barrier_wait( (pthread_barrier_t*)arg ); + return NULL; +} + +int main ( void ) +{ + pthread_barrier_t *bar1, *bar2, *bar3, *bar4, *bar5; + pthread_t thr1, thr2; + int r; + + /* possibly set up a watchdog timer thread here. */ + + + + + + + + + + + + /* initialise a barrier with a zero count */ + fprintf(stderr, "\ninitialise a barrier with zero count\n"); + bar1 = malloc(sizeof(pthread_barrier_t)); + pthread_barrier_init(bar1, NULL, 0); + + /* initialise a barrier twice */ + fprintf(stderr, "\ninitialise a barrier twice\n"); + bar2 = malloc(sizeof(pthread_barrier_t)); + pthread_barrier_init(bar2, NULL, 1); + pthread_barrier_init(bar2, NULL, 1); + + /* initialise a barrier which has threads waiting on it. + This isn't too simple. */ + fprintf(stderr, "\ninitialise a barrier which has threads waiting on it\n"); + bar3 = malloc(sizeof(pthread_barrier_t)); + pthread_barrier_init(bar3, NULL, 2); + /* create a thread, whose only purpose is to block on the barrier */ + pthread_create(&thr1, NULL, child1, (void*)bar3); + /* guarantee that it gets there first */ + sleep(1); + /* and now reinitialise */ + pthread_barrier_init(bar3, NULL, 3); + + /* destroy a barrier that has threads waiting at it */ + fprintf(stderr, "\ndestroy a barrier that has waiting threads\n"); + /* once again, create a thread, whose only purpose is to block. */ + bar4 = malloc(sizeof(pthread_barrier_t)); + pthread_barrier_init(bar4, NULL, 2); + /* create a thread, whose only purpose is to block on the barrier */ + pthread_create(&thr2, NULL, child1, (void*)bar4); + /* guarantee that it gets there first */ + sleep(1); + /* and now destroy */ + pthread_barrier_destroy(bar4); + + /* destroy a barrier that was never initialised. This is a bit + tricky, in that we have to fill the barrier with bytes which + ensure that the pthread_barrier_destroy call doesn't hang for + some reason. Zero-fill seems to work ok on amd64-linux (glibc + 2.8). */ + fprintf(stderr, "\ndestroy a barrier that was never initialised\n"); + bar5 = malloc(sizeof(pthread_barrier_t)); + assert(bar5); + memset(bar5, 0, sizeof(*bar5)); + pthread_barrier_destroy(bar5); + + /* now we need to clean up the mess .. */ + r= pthread_cancel(thr1); assert(!r); + r= pthread_cancel(thr2); assert(!r); + + free(bar1); free(bar2); free(bar3); free(bar4); free(bar5); + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/bar_bad.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/bar_bad.stderr.exp.svn-base new file mode 100644 index 0000000..7fa1270 --- /dev/null +++ b/helgrind/tests/.svn/text-base/bar_bad.stderr.exp.svn-base @@ -0,0 +1,45 @@ + +initialise a barrier with zero count +Thread #x is the program's root thread + +Thread #x: pthread_barrier_init: 'count' argument is zero + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:39) + +Thread #x's call to pthread_barrier_init failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:39) + +initialise a barrier twice + +Thread #x: pthread_barrier_init: barrier is already initialised + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:45) + +initialise a barrier which has threads waiting on it + +Thread #x: pthread_barrier_init: barrier is already initialised + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:57) + +Thread #x: pthread_barrier_init: threads are waiting at barrier + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:57) + +destroy a barrier that has waiting threads + +Thread #x: pthread_barrier_destroy: threads are waiting at barrier + at 0x........: pthread_barrier_destroy (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:69) + +Thread #x's call to pthread_barrier_destroy failed + with error code 16 (EBUSY: Device or resource busy) + at 0x........: pthread_barrier_destroy (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:69) + +destroy a barrier that was never initialised + +Thread #x: pthread_barrier_destroy: barrier was never initialised + at 0x........: pthread_barrier_destroy (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:80) diff --git a/helgrind/tests/.svn/text-base/bar_bad.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/bar_bad.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/bar_bad.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/bar_bad.vgtest.svn-base b/helgrind/tests/.svn/text-base/bar_bad.vgtest.svn-base new file mode 100644 index 0000000..fe946f5 --- /dev/null +++ b/helgrind/tests/.svn/text-base/bar_bad.vgtest.svn-base @@ -0,0 +1,3 @@ +prereq: test -e bar_bad +prog: bar_bad +vgopts: -q diff --git a/helgrind/tests/.svn/text-base/bar_trivial.c.svn-base b/helgrind/tests/.svn/text-base/bar_trivial.c.svn-base new file mode 100644 index 0000000..8c221ae --- /dev/null +++ b/helgrind/tests/.svn/text-base/bar_trivial.c.svn-base @@ -0,0 +1,57 @@ + +/* This is the most trivial test I could think of that involves + barriers. If H fails to notice the pthread_barrier_wait call then + it will report a race. Correct behaviour is not to report a race + (there isn't one.) */ +#define _GNU_SOURCE +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <unistd.h> + +int x = 0; + +pthread_barrier_t bar; + +void* child_fn ( void* arg ) +{ + long r, n = (long)arg; + + if (n == 1) x++; + + r = pthread_barrier_wait(&bar); + assert(r == 0 || r == PTHREAD_BARRIER_SERIAL_THREAD); + + if (n == 0) x++; + + sleep(1); /* ensure both threads get to this point before + either exits. */ + return NULL; +} + +#define NTHR 2 + +int main ( void ) +{ + long i, r; + pthread_t thr[NTHR]; + + r = pthread_barrier_init(&bar, NULL, NTHR); + assert(!r); + + for (i = 0; i < NTHR; i++) { + r = pthread_create(&thr[i], NULL, child_fn, (void*)i); + assert(!r); + } + + for (i = 0; i < NTHR; i++) { + r = pthread_join(thr[i], NULL); + assert(!r); + } + + r = pthread_barrier_destroy(&bar); assert(!r); + + printf("x = %d\n", x); + return 0; +} diff --git a/helgrind/tests/.svn/text-base/bar_trivial.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/bar_trivial.stderr.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/bar_trivial.stderr.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/bar_trivial.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/bar_trivial.stdout.exp.svn-base new file mode 100644 index 0000000..407de30 --- /dev/null +++ b/helgrind/tests/.svn/text-base/bar_trivial.stdout.exp.svn-base @@ -0,0 +1 @@ +x = 2 diff --git a/helgrind/tests/.svn/text-base/bar_trivial.vgtest.svn-base b/helgrind/tests/.svn/text-base/bar_trivial.vgtest.svn-base new file mode 100644 index 0000000..40f2776 --- /dev/null +++ b/helgrind/tests/.svn/text-base/bar_trivial.vgtest.svn-base @@ -0,0 +1,3 @@ +prereq: test -e bar_trivial +prog: bar_trivial +vgopts: -q diff --git a/helgrind/tests/.svn/text-base/filter_stderr.svn-base b/helgrind/tests/.svn/text-base/filter_stderr.svn-base new file mode 100644 index 0000000..5b71068 --- /dev/null +++ b/helgrind/tests/.svn/text-base/filter_stderr.svn-base @@ -0,0 +1,60 @@ +#! /bin/sh + +dir=`dirname $0` + +$dir/../../tests/filter_stderr_basic | + +# Anonymise addresses +$dir/../../tests/filter_addresses | + +# Remove "Helgrind, ..." line and the following copyright line. +sed "/^Helgrind, a thread error detector/ , /./ d" | + +# Anonymise line numbers in hg_intercepts.c +sed "s/hg_intercepts.c:[0-9]\+/hg_intercepts.c:.../g" | + +# Change (eg) "/lib64/libpthread-2.5.so" into "/...libpthread..." +sed \ + -e "s/(in \/.*libpthread.*)$/(in \/...libpthread...)/" \ + -e "s/(within \/.*libpthread.*)$/(within \/...libpthread...)/" | + +# Tidy up in cases where glibc (+ libdl + libpthread + ld) have +# been built with debugging information, hence source locs are present +sed \ + -e "s/(createthread.c:[0-9]*)/(in \/...libpthread...)/g" \ + -e "s/(clone.S:[0-9]*)/(in \/...libc...)/g" \ + -e "s/start_thread (pthread_create.c:[0-9]*)$/start_thread (in \/...libpthread...)/g" | + +# Merge sem_wait and sem_wait@*, as either could be used. Likewise for +# sem_post. +sed \ + -e "s/sem_wait@\*/sem_wait/" \ + -e "s/sem_post@\*/sem_post/" | + +# get rid of the numbers in bits of text "Thread #n", "thread #n", +# "Thread n" and "thread n", +# as these make some tests more scheduling sensitive -- those where +# there are multiple threads which play interchangeable roles. +sed \ + -e "s/hread #[0-9][0-9]*/hread #x/g" \ + -e "s/hread [0-9][0-9]*/hread x/g" | + +# Likewise for frame numbers, which depend on compilation. +sed -e "s/frame #[0-9][0-9]*/frame #x/g" | \ + +# "Thread #x was created" stack traces are unreliable once you get above +# "pthread_create@* (hg_intercepts.c:...)" -- they can contan +# "pthread_create@GLIBC_", "do_clone", "clone", etc. So we cut all the +# "at"/"by" lines above "pthread_create@*". +perl -p -0 -e 's/(Thread #. was created\n)( (at|by)[^\n]*\n)*( by 0x........: pthread_create@\* \(hg_intercepts.c:...\)\n)/$1 ...\n$4/gs' | + +# Anything below "mythread_wrapper" in stack traces is unreliable, +# containing libc and libpthread stuff like start_thread, clone, etc. So we +# remove all the "by" lines below "mythread_wrapper". +perl -p -0 -e 's/( by 0x........: mythread_wrapper \(hg_intercepts.c:...\)\n)( by[^\n]*\n)*/$1 ...\n/gs' | + +# Entire trace in a "Exiting thread still holds <N> lock(s)" is unreliable, +# containing libc stuff like _Exit(), exit(), etc. So we remove all the +# "at"/"by" lines below the message. +perl -p -0 -e 's/(Thread #.: Exiting thread still holds [0-9]+ locks?\n)( (at|by)[^\n]*\n)*/$1 ...\n/gs' + diff --git a/helgrind/tests/.svn/text-base/hg01_all_ok.c.svn-base b/helgrind/tests/.svn/text-base/hg01_all_ok.c.svn-base new file mode 100644 index 0000000..144ce60 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg01_all_ok.c.svn-base @@ -0,0 +1,32 @@ +/* All OK */ + +#include <pthread.h> + +static pthread_mutex_t mx = PTHREAD_MUTEX_INITIALIZER; + +static int shared; + +static void *th(void *v) +{ + pthread_mutex_lock(&mx); + shared++; + pthread_mutex_unlock(&mx); + + return 0; +} + +int main() +{ + pthread_t a, b; + + pthread_mutex_lock(&mx); + pthread_mutex_unlock(&mx); + + pthread_create(&a, NULL, th, NULL); + pthread_create(&b, NULL, th, NULL); + + pthread_join(a, NULL); + pthread_join(b, NULL); + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/hg01_all_ok.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/hg01_all_ok.stderr.exp.svn-base new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg01_all_ok.stderr.exp.svn-base @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/hg01_all_ok.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/hg01_all_ok.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg01_all_ok.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/hg01_all_ok.vgtest.svn-base b/helgrind/tests/.svn/text-base/hg01_all_ok.vgtest.svn-base new file mode 100644 index 0000000..9524976 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg01_all_ok.vgtest.svn-base @@ -0,0 +1 @@ +prog: hg01_all_ok diff --git a/helgrind/tests/.svn/text-base/hg02_deadlock.c.svn-base b/helgrind/tests/.svn/text-base/hg02_deadlock.c.svn-base new file mode 100644 index 0000000..1142f5c --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg02_deadlock.c.svn-base @@ -0,0 +1,43 @@ +/* Simple possible deadlock */ +#include <pthread.h> + +static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER; + +static void *t1(void *v) +{ + pthread_mutex_lock(&m1); + pthread_mutex_lock(&m2); + pthread_mutex_unlock(&m1); + pthread_mutex_unlock(&m2); + + return 0; +} + +static void *t2(void *v) +{ + pthread_mutex_lock(&m2); + pthread_mutex_lock(&m1); + pthread_mutex_unlock(&m1); + pthread_mutex_unlock(&m2); + + return 0; +} + +int main() +{ + pthread_t a, b; + + /* prevent spurious messages from the dynamic linker */ + pthread_mutex_lock(&m1); + pthread_mutex_unlock(&m1); + + pthread_create(&a, NULL, t1, NULL); + pthread_create(&b, NULL, t2, NULL); + + pthread_join(a, NULL); + pthread_join(b, NULL); + + return 0; +} + diff --git a/helgrind/tests/.svn/text-base/hg02_deadlock.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/hg02_deadlock.stderr.exp.svn-base new file mode 100644 index 0000000..cec8d41 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg02_deadlock.stderr.exp.svn-base @@ -0,0 +1,23 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (hg02_deadlock.c:36) + +Thread #x: lock order "0x........ before 0x........" violated + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: t2 (hg02_deadlock.c:20) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Required order was established by acquisition of lock at 0x........ + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: t1 (hg02_deadlock.c:9) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + followed by a later acquisition of lock at 0x........ + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: t1 (hg02_deadlock.c:10) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/hg02_deadlock.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/hg02_deadlock.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg02_deadlock.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/hg02_deadlock.vgtest.svn-base b/helgrind/tests/.svn/text-base/hg02_deadlock.vgtest.svn-base new file mode 100644 index 0000000..ff0deb7 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg02_deadlock.vgtest.svn-base @@ -0,0 +1 @@ +prog: hg02_deadlock diff --git a/helgrind/tests/.svn/text-base/hg03_inherit.c.svn-base b/helgrind/tests/.svn/text-base/hg03_inherit.c.svn-base new file mode 100644 index 0000000..7c429f8 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg03_inherit.c.svn-base @@ -0,0 +1,67 @@ + +/* I don't think this is a very good test .. all this + sleepery is highly confusing. */ + +/* test child thread inheriting data */ + +#include <stdio.h> +#include <pthread.h> +#include <unistd.h> + +static volatile int shared[2]; + +static void *t1(void *v) +{ + volatile int *ip = (int *)v; + if (0) printf("ta W\n"); + *ip += 44; + *ip *= 2; + sleep(1); + return 0; +} + +static void *t2(void *v) +{ + volatile int *ip = (int *)v; + sleep(2); + if (0) printf("tb W\n"); + *ip += 88; + *ip *= 3; + sleep(1); + return 0; +} + +int main(void) +{ + pthread_t a, b; + volatile int ret = 0; + + sleep(0); + + shared[0] = 22; + shared[1] = 77; + + pthread_create(&a, NULL, t1, (void *)&shared[0]); + // a steals shared[0] from root thread, so is excl(a) + pthread_create(&b, NULL, t2, (void *)&shared[1]); + // b steals shared[1] from root thread, so is excl(b) + + pthread_join(a, NULL); + // b's stuff (shared[1]) still belongs to b, so is excl(b) + + // ret is excl(root), and shared[0] is re-acquired as excl(root) + // since a joined to root + if (0) printf("r R1\n"); + ret += shared[0]; /* no error - a is finished */ + + // but shared[1] is excl(b); hence we're reading excl(b) + // without a lock and without a dependency edge + if (0) printf("r R2\n"); + ret += shared[1]; /* expect error - b has not finished, + so we can't touch shared[1] yet */ + + pthread_join(b, NULL); + + + return ret; +} diff --git a/helgrind/tests/.svn/text-base/hg03_inherit.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/hg03_inherit.stderr.exp.svn-base new file mode 100644 index 0000000..feed364 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg03_inherit.stderr.exp.svn-base @@ -0,0 +1,27 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (hg03_inherit.c:46) + +Thread #x is the program's root thread + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: t2 (hg03_inherit.c:28) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous read of size 4 by thread #x + at 0x........: main (hg03_inherit.c:60) + Location 0x........ is 0 bytes inside shared[1], + declared at hg03_inherit.c:11, in frame #x of thread x + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: t2 (hg03_inherit.c:29) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous read of size 4 by thread #x + at 0x........: main (hg03_inherit.c:60) + Location 0x........ is 0 bytes inside shared[1], + declared at hg03_inherit.c:11, in frame #x of thread x + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/hg03_inherit.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/hg03_inherit.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg03_inherit.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/hg03_inherit.vgtest.svn-base b/helgrind/tests/.svn/text-base/hg03_inherit.vgtest.svn-base new file mode 100644 index 0000000..548a489 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg03_inherit.vgtest.svn-base @@ -0,0 +1,2 @@ +prog: hg03_inherit +vgopts: --read-var-info=yes diff --git a/helgrind/tests/.svn/text-base/hg04_race.c.svn-base b/helgrind/tests/.svn/text-base/hg04_race.c.svn-base new file mode 100644 index 0000000..111195b --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg04_race.c.svn-base @@ -0,0 +1,27 @@ +/* A simple race */ + +#include <pthread.h> +#include <unistd.h> + +static int shared; + +static void *th(void *v) +{ + shared++; + + return 0; +} + +int main() +{ + pthread_t a, b; + + pthread_create(&a, NULL, th, NULL); + sleep(1); /* force ordering */ + pthread_create(&b, NULL, th, NULL); + + pthread_join(a, NULL); + pthread_join(b, NULL); + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/hg04_race.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/hg04_race.stderr.exp.svn-base new file mode 100644 index 0000000..9996006 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg04_race.stderr.exp.svn-base @@ -0,0 +1,34 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (hg04_race.c:21) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (hg04_race.c:19) + +Possible data race during read of size 4 at 0x........ by thread #x + at 0x........: th (hg04_race.c:10) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: th (hg04_race.c:10) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside local var "shared" + declared at hg04_race.c:6, in frame #x of thread x + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: th (hg04_race.c:10) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: th (hg04_race.c:10) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside local var "shared" + declared at hg04_race.c:6, in frame #x of thread x + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/hg04_race.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/hg04_race.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg04_race.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/hg04_race.vgtest.svn-base b/helgrind/tests/.svn/text-base/hg04_race.vgtest.svn-base new file mode 100644 index 0000000..42ee396 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg04_race.vgtest.svn-base @@ -0,0 +1,2 @@ +prog: hg04_race +vgopts: --read-var-info=yes diff --git a/helgrind/tests/.svn/text-base/hg05_race2.c.svn-base b/helgrind/tests/.svn/text-base/hg05_race2.c.svn-base new file mode 100644 index 0000000..de01f2c --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg05_race2.c.svn-base @@ -0,0 +1,35 @@ +/* A simple race - test symaddr */ + +#include <pthread.h> +#include <unistd.h> + +struct foo { + struct bar { + int plop[22]; + char biff; + } poot[11]; +}; + +static void *th(void *v) +{ + struct foo *f = (struct foo *)v; + + f->poot[5].plop[11]++; + + return 0; +} + +int main() +{ + struct foo foo; + pthread_t a, b; + + pthread_create(&a, NULL, th, &foo); + sleep(1); /* force ordering */ + pthread_create(&b, NULL, th, &foo); + + pthread_join(a, NULL); + pthread_join(b, NULL); + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/hg05_race2.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/hg05_race2.stderr.exp.svn-base new file mode 100644 index 0000000..067a194 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg05_race2.stderr.exp.svn-base @@ -0,0 +1,34 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (hg05_race2.c:29) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (hg05_race2.c:27) + +Possible data race during read of size 4 at 0x........ by thread #x + at 0x........: th (hg05_race2.c:17) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: th (hg05_race2.c:17) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside foo.poot[5].plop[11], + declared at hg05_race2.c:24, in frame #x of thread x + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: th (hg05_race2.c:17) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: th (hg05_race2.c:17) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside foo.poot[5].plop[11], + declared at hg05_race2.c:24, in frame #x of thread x + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/hg05_race2.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/hg05_race2.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg05_race2.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/hg05_race2.vgtest.svn-base b/helgrind/tests/.svn/text-base/hg05_race2.vgtest.svn-base new file mode 100644 index 0000000..250a6eb --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg05_race2.vgtest.svn-base @@ -0,0 +1,2 @@ +prog: hg05_race2 +vgopts: --read-var-info=yes diff --git a/helgrind/tests/.svn/text-base/hg06_readshared.c.svn-base b/helgrind/tests/.svn/text-base/hg06_readshared.c.svn-base new file mode 100644 index 0000000..3904b44 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg06_readshared.c.svn-base @@ -0,0 +1,33 @@ +/* All OK - test allowed read sharing */ + +#include <pthread.h> +#include <assert.h> + +static int shared; + +static void *t1(void *v) +{ + return (void *)(long)(shared + 44); +} + +static void *t2(void *v) +{ + return (void *)(long)(shared + 55); +} + +int main() +{ + pthread_t a, b; + + shared = 22; + + pthread_create(&a, NULL, t1, NULL); + pthread_create(&b, NULL, t2, NULL); + + pthread_join(a, NULL); + pthread_join(b, NULL); + + assert(shared == 22); + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/hg06_readshared.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/hg06_readshared.stderr.exp.svn-base new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg06_readshared.stderr.exp.svn-base @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/hg06_readshared.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/hg06_readshared.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg06_readshared.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/hg06_readshared.vgtest.svn-base b/helgrind/tests/.svn/text-base/hg06_readshared.vgtest.svn-base new file mode 100644 index 0000000..c5accee --- /dev/null +++ b/helgrind/tests/.svn/text-base/hg06_readshared.vgtest.svn-base @@ -0,0 +1 @@ +prog: hg06_readshared diff --git a/helgrind/tests/.svn/text-base/pth_barrier1.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/pth_barrier1.stderr.exp.svn-base new file mode 100644 index 0000000..6df3a23 --- /dev/null +++ b/helgrind/tests/.svn/text-base/pth_barrier1.stderr.exp.svn-base @@ -0,0 +1,20 @@ +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: barriers_and_races (pth_barrier.c:84) + by 0x........: main (pth_barrier.c:107) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: barriers_and_races (pth_barrier.c:84) + by 0x........: main (pth_barrier.c:107) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... diff --git a/helgrind/tests/.svn/text-base/pth_barrier1.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/pth_barrier1.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/pth_barrier1.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/pth_barrier1.vgtest.svn-base b/helgrind/tests/.svn/text-base/pth_barrier1.vgtest.svn-base new file mode 100644 index 0000000..7b0d62f --- /dev/null +++ b/helgrind/tests/.svn/text-base/pth_barrier1.vgtest.svn-base @@ -0,0 +1,4 @@ +prereq: test -e bar_trivial +prog: ../../drd/tests/pth_barrier +args: 2 1 1 +vgopts: -q diff --git a/helgrind/tests/.svn/text-base/pth_barrier2.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/pth_barrier2.stderr.exp.svn-base new file mode 100644 index 0000000..84a2a0a --- /dev/null +++ b/helgrind/tests/.svn/text-base/pth_barrier2.stderr.exp.svn-base @@ -0,0 +1,299 @@ +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: barriers_and_races (pth_barrier.c:84) + by 0x........: main (pth_barrier.c:107) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: barriers_and_races (pth_barrier.c:84) + by 0x........: main (pth_barrier.c:107) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... diff --git a/helgrind/tests/.svn/text-base/pth_barrier2.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/pth_barrier2.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/pth_barrier2.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/pth_barrier2.vgtest.svn-base b/helgrind/tests/.svn/text-base/pth_barrier2.vgtest.svn-base new file mode 100644 index 0000000..13036b3 --- /dev/null +++ b/helgrind/tests/.svn/text-base/pth_barrier2.vgtest.svn-base @@ -0,0 +1,4 @@ +prereq: test -e bar_trivial +prog: ../../drd/tests/pth_barrier +args: 2 32 1 +vgopts: -q --cmp-race-err-addrs=yes diff --git a/helgrind/tests/.svn/text-base/pth_barrier3.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/pth_barrier3.stderr.exp.svn-base new file mode 100644 index 0000000..6df3a23 --- /dev/null +++ b/helgrind/tests/.svn/text-base/pth_barrier3.stderr.exp.svn-base @@ -0,0 +1,20 @@ +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: barriers_and_races (pth_barrier.c:84) + by 0x........: main (pth_barrier.c:107) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: barriers_and_races (pth_barrier.c:84) + by 0x........: main (pth_barrier.c:107) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... diff --git a/helgrind/tests/.svn/text-base/pth_barrier3.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/pth_barrier3.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/pth_barrier3.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/pth_barrier3.vgtest.svn-base b/helgrind/tests/.svn/text-base/pth_barrier3.vgtest.svn-base new file mode 100644 index 0000000..06ab6c3 --- /dev/null +++ b/helgrind/tests/.svn/text-base/pth_barrier3.vgtest.svn-base @@ -0,0 +1,4 @@ +prereq: test -e bar_trivial +prog: ../../drd/tests/pth_barrier +args: 32 1 1 +vgopts: -q diff --git a/helgrind/tests/.svn/text-base/rwlock_race.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/rwlock_race.stderr.exp.svn-base new file mode 100644 index 0000000..e62847e --- /dev/null +++ b/helgrind/tests/.svn/text-base/rwlock_race.stderr.exp.svn-base @@ -0,0 +1,24 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (rwlock_race.c:48) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (rwlock_race.c:47) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: thread_func (rwlock_race.c:29) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: thread_func (rwlock_race.c:29) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside local var "s_racy" + declared at rwlock_race.c:18, in frame #x of thread x +Result: 2 + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/rwlock_race.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/rwlock_race.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/rwlock_race.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/rwlock_race.vgtest.svn-base b/helgrind/tests/.svn/text-base/rwlock_race.vgtest.svn-base new file mode 100644 index 0000000..00b462f --- /dev/null +++ b/helgrind/tests/.svn/text-base/rwlock_race.vgtest.svn-base @@ -0,0 +1,2 @@ +prog: ../../drd/tests/rwlock_race +vgopts: --read-var-info=yes diff --git a/helgrind/tests/.svn/text-base/rwlock_test.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/rwlock_test.stderr.exp.svn-base new file mode 100644 index 0000000..a7089bb --- /dev/null +++ b/helgrind/tests/.svn/text-base/rwlock_test.stderr.exp.svn-base @@ -0,0 +1,4 @@ + +Finished. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/rwlock_test.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/rwlock_test.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/rwlock_test.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/rwlock_test.vgtest.svn-base b/helgrind/tests/.svn/text-base/rwlock_test.vgtest.svn-base new file mode 100644 index 0000000..4257fc9 --- /dev/null +++ b/helgrind/tests/.svn/text-base/rwlock_test.vgtest.svn-base @@ -0,0 +1 @@ +prog: ../../drd/tests/rwlock_test diff --git a/helgrind/tests/.svn/text-base/tc01_simple_race.c.svn-base b/helgrind/tests/.svn/text-base/tc01_simple_race.c.svn-base new file mode 100644 index 0000000..abf37b5 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc01_simple_race.c.svn-base @@ -0,0 +1,36 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +/* Simple test program, has a race. Parent and child both modify x + with no locking. */ + +int x = 0; + +void* child_fn ( void* arg ) +{ + /* Unprotected relative to parent */ + x++; + return NULL; +} + +int main ( void ) +{ + pthread_t child; + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + /* Unprotected relative to child */ + x++; + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc01_simple_race.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc01_simple_race.stderr.exp.svn-base new file mode 100644 index 0000000..1fc04fe --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc01_simple_race.stderr.exp.svn-base @@ -0,0 +1,27 @@ + +Thread #x is the program's root thread + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc01_simple_race.c:22) + +Possible data race during read of size 4 at 0x........ by thread #x + at 0x........: main (tc01_simple_race.c:28) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc01_simple_race.c:14) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "x" + declared at tc01_simple_race.c:9 + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: main (tc01_simple_race.c:28) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc01_simple_race.c:14) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "x" + declared at tc01_simple_race.c:9 + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc01_simple_race.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc01_simple_race.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc01_simple_race.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc01_simple_race.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc01_simple_race.vgtest.svn-base new file mode 100644 index 0000000..be686ab --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc01_simple_race.vgtest.svn-base @@ -0,0 +1,2 @@ +prog: tc01_simple_race +vgopts: --read-var-info=yes diff --git a/helgrind/tests/.svn/text-base/tc02_simple_tls.c.svn-base b/helgrind/tests/.svn/text-base/tc02_simple_tls.c.svn-base new file mode 100644 index 0000000..a23b14c --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc02_simple_tls.c.svn-base @@ -0,0 +1,39 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +/* Simple test program, no race: parent only modified x after child + has modified it and then joined with the parent. Tests simple + thread lifetime segment handling. */ + +int x = 0; + +void* child_fn ( void* arg ) +{ + /* Unprotected relative to parent, but in child's segment only */ + x++; + return NULL; +} + +int main ( void ) +{ + pthread_t child; + + x++; /* happens in parent's segment */ + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + /* Now back in parent's segment */ + x++; + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc02_simple_tls.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc02_simple_tls.stderr.exp.svn-base new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc02_simple_tls.stderr.exp.svn-base @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc02_simple_tls.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc02_simple_tls.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc02_simple_tls.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc02_simple_tls.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc02_simple_tls.vgtest.svn-base new file mode 100644 index 0000000..57db35c --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc02_simple_tls.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc02_simple_tls diff --git a/helgrind/tests/.svn/text-base/tc03_re_excl.c.svn-base b/helgrind/tests/.svn/text-base/tc03_re_excl.c.svn-base new file mode 100644 index 0000000..4f3ce51 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc03_re_excl.c.svn-base @@ -0,0 +1,44 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +/* Simple test program, no race: parent only modifies x after child + has modified it and then joined with the parent. Tests simple + thread lifetime segment handling. */ + +/* A simple function to "use" a value, so that gcc can't + possibly optimise it into nothing. */ +static void use ( int x ) { + __asm__ __volatile__( "nop" : : "r"(x) : "cc","memory" ); +} + +static void* worker_thread ( void* argV ) +{ + int* arg = (int*)argV; + use(arg[5]); /* read access */ + return NULL; +} + +int main ( void ) +{ + pthread_t thread_id; + volatile int* x = malloc(10 * sizeof(int)); + x[5] = 1; + /* x[5] is Excl(parent) */ + + pthread_create(&thread_id, 0, worker_thread, (void*)x); + + use(x[5]); /* read access */ + + /* Just before the threads join, x[5] is ShR (read by both parent + and child) */ + pthread_join(thread_id, 0); + /* x[5] is Excl(parent), because only parent and child accessed it + and child has merged to parent. So now it's ok for parent to + access it without locking. */ + + x[5] = 0; /* write access */ + + return x[5]; +} diff --git a/helgrind/tests/.svn/text-base/tc03_re_excl.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc03_re_excl.stderr.exp.svn-base new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc03_re_excl.stderr.exp.svn-base @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc03_re_excl.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc03_re_excl.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc03_re_excl.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc03_re_excl.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc03_re_excl.vgtest.svn-base new file mode 100644 index 0000000..e12924a --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc03_re_excl.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc03_re_excl diff --git a/helgrind/tests/.svn/text-base/tc04_free_lock.c.svn-base b/helgrind/tests/.svn/text-base/tc04_free_lock.c.svn-base new file mode 100644 index 0000000..c1ffa25 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc04_free_lock.c.svn-base @@ -0,0 +1,50 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> + +/* Delete memory that has a held lock and see what happens. */ + +typedef struct { int stuff[2000]; + pthread_mutex_t lock; int morestuff[2000]; } XX; + +void bar ( void ); +void foo ( void ); + +int main ( void ) +{ + XX* xx = malloc(sizeof(XX)); + assert(xx); + + pthread_mutex_init( &xx->lock, NULL ); + + pthread_mutex_lock( &xx->lock ); + + free(xx); + + bar(); + foo(); + bar(); + + return 0; +} + +/* Try the same, on the stack */ +void bar ( void ) +{ + pthread_mutex_t mx = PTHREAD_MUTEX_INITIALIZER; + // pthread_mutex_init( &mx, NULL ); + pthread_mutex_lock( &mx ); + /* now just abandon mx */ +} + +/* and again ... */ +void foo ( void ) +{ + pthread_mutex_t mx; + pthread_mutex_init( &mx, NULL ); + pthread_mutex_lock( &mx ); + /* now just abandon mx */ +} + diff --git a/helgrind/tests/.svn/text-base/tc04_free_lock.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc04_free_lock.stderr.exp.svn-base new file mode 100644 index 0000000..11a0329 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc04_free_lock.stderr.exp.svn-base @@ -0,0 +1,7 @@ + +Thread #x is the program's root thread + +Thread #x: Exiting thread still holds 2 locks + ... + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc04_free_lock.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc04_free_lock.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc04_free_lock.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc04_free_lock.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc04_free_lock.vgtest.svn-base new file mode 100644 index 0000000..27d28bf --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc04_free_lock.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc04_free_lock diff --git a/helgrind/tests/.svn/text-base/tc05_simple_race.c.svn-base b/helgrind/tests/.svn/text-base/tc05_simple_race.c.svn-base new file mode 100644 index 0000000..287c12c --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc05_simple_race.c.svn-base @@ -0,0 +1,44 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +/* Simple test program, has a race. Parent and child both modify y + with no locking. This is the program shown in Fig 2 of the + original Eraser paper by Savage et al. */ + +int y = 0, v = 0; +pthread_mutex_t mu = PTHREAD_MUTEX_INITIALIZER; + +void* child_fn ( void* arg ) +{ + /* "Thread 2" in the paper */ + pthread_mutex_lock( &mu ); + v = v + 1; + pthread_mutex_unlock( &mu ); + y = y + 1; + return NULL; +} + +int main ( void ) +{ + pthread_t child; + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + /* "Thread 1" in the paper */ + y = y + 1; + pthread_mutex_lock( &mu ); + v = v + 1; + pthread_mutex_unlock( &mu ); + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc05_simple_race.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc05_simple_race.stderr.exp.svn-base new file mode 100644 index 0000000..f90f6b2 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc05_simple_race.stderr.exp.svn-base @@ -0,0 +1,27 @@ + +Thread #x is the program's root thread + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc05_simple_race.c:27) + +Possible data race during read of size 4 at 0x........ by thread #x + at 0x........: main (tc05_simple_race.c:33) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc05_simple_race.c:19) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "y" + declared at tc05_simple_race.c:10 + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: main (tc05_simple_race.c:33) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc05_simple_race.c:19) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "y" + declared at tc05_simple_race.c:10 + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc05_simple_race.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc05_simple_race.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc05_simple_race.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc05_simple_race.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc05_simple_race.vgtest.svn-base new file mode 100644 index 0000000..0d6800a --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc05_simple_race.vgtest.svn-base @@ -0,0 +1,2 @@ +prog: tc05_simple_race +vgopts: --read-var-info=yes diff --git a/helgrind/tests/.svn/text-base/tc06_two_races.c.svn-base b/helgrind/tests/.svn/text-base/tc06_two_races.c.svn-base new file mode 100644 index 0000000..4eaf9dd --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc06_two_races.c.svn-base @@ -0,0 +1,43 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +/* Simple test program, has two races. A happens-before detector can only + ever detect one of them, though. XXX: apparently not so; Drd and H 3.4 detect both. */ + +int unprot1 = 0, unprot2 = 0, prot = 0; +pthread_mutex_t mu = PTHREAD_MUTEX_INITIALIZER; + +void* child_fn ( void* arg ) +{ + unprot1 ++; + pthread_mutex_lock( &mu ); + prot ++; + pthread_mutex_unlock( &mu ); + unprot2 ++; + return NULL; +} + +int main ( void ) +{ + pthread_t child; + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + unprot1 ++; + pthread_mutex_lock( &mu ); + prot ++; + pthread_mutex_unlock( &mu ); + unprot2 ++; + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc06_two_races.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc06_two_races.stderr.exp.svn-base new file mode 100644 index 0000000..c49d364 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc06_two_races.stderr.exp.svn-base @@ -0,0 +1,45 @@ + +Thread #x is the program's root thread + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc06_two_races.c:26) + +Possible data race during read of size 4 at 0x........ by thread #x + at 0x........: main (tc06_two_races.c:31) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc06_two_races.c:14) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "unprot1" + declared at tc06_two_races.c:9 + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: main (tc06_two_races.c:31) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc06_two_races.c:14) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "unprot1" + declared at tc06_two_races.c:9 + +Possible data race during read of size 4 at 0x........ by thread #x + at 0x........: main (tc06_two_races.c:35) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc06_two_races.c:18) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "unprot2" + declared at tc06_two_races.c:9 + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: main (tc06_two_races.c:35) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc06_two_races.c:18) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "unprot2" + declared at tc06_two_races.c:9 + +ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc06_two_races.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc06_two_races.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc06_two_races.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc06_two_races.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc06_two_races.vgtest.svn-base new file mode 100644 index 0000000..28f9bdf --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc06_two_races.vgtest.svn-base @@ -0,0 +1,2 @@ +prog: tc06_two_races +vgopts: --read-var-info=yes diff --git a/helgrind/tests/.svn/text-base/tc07_hbl1.c.svn-base b/helgrind/tests/.svn/text-base/tc07_hbl1.c.svn-base new file mode 100644 index 0000000..12253aa --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc07_hbl1.c.svn-base @@ -0,0 +1,77 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +/* Simple test program, no race. Parent and child both modify x and + use the hardware bus lock. */ + +#undef PLAT_x86_linux +#undef PLAT_amd64_linux +#undef PLAT_ppc32_linux +#undef PLAT_ppc64_linux +#undef PLAT_ppc32_aix5 +#undef PLAT_ppc64_aix5 + +#if !defined(_AIX) && defined(__i386__) +# define PLAT_x86_linux 1 +#elif !defined(_AIX) && defined(__x86_64__) +# define PLAT_amd64_linux 1 +#elif !defined(_AIX) && defined(__powerpc__) && !defined(__powerpc64__) +# define PLAT_ppc32_linux 1 +#elif !defined(_AIX) && defined(__powerpc__) && defined(__powerpc64__) +# define PLAT_ppc64_linux 1 +#elif defined(_AIX) && defined(__64BIT__) +# define PLAT_ppc64_aix5 1 +#elif defined(_AIX) && !defined(__64BIT__) +# define PLAT_ppc32_aix5 1 +#endif + +#if defined(PLAT_amd64_linux) || defined(PLAT_x86_linux) +# define INC(_lval,_lqual) \ + __asm__ __volatile__ ( \ + "lock ; incl (%0)" : /*out*/ : /*in*/"r"(&(_lval)) : "memory", "cc" ) +#elif defined(PLAT_ppc32_linux) || defined(PLAT_ppc64_linux) \ + || defined(PLAT_ppc32_aix5) || defined(PLAT_ppc64_aix5) +# define INC(_lval,_lqual) \ + __asm__ __volatile__( \ + "L1xyzzy1" _lqual ":\n" \ + " lwarx 15,0,%0\n" \ + " addi 15,15,1\n" \ + " stwcx. 15,0,%0\n" \ + " bne- L1xyzzy1" _lqual \ + : /*out*/ : /*in*/ "b"(&(_lval)) \ + : /*trash*/ "r15", "cr0", "memory" \ + ) +#else +# error "Fix Me for this platform" +#endif + + +int x = 0; + +void* child_fn ( void* arg ) +{ + INC(x, "childfn"); + return NULL; +} + +int main ( void ) +{ + pthread_t child; + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + INC(x, "main"); + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + printf("x = %d\n", x); + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc07_hbl1.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc07_hbl1.stderr.exp.svn-base new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc07_hbl1.stderr.exp.svn-base @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc07_hbl1.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc07_hbl1.stdout.exp.svn-base new file mode 100644 index 0000000..407de30 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc07_hbl1.stdout.exp.svn-base @@ -0,0 +1 @@ +x = 2 diff --git a/helgrind/tests/.svn/text-base/tc07_hbl1.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc07_hbl1.vgtest.svn-base new file mode 100644 index 0000000..71c463f --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc07_hbl1.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc07_hbl1 diff --git a/helgrind/tests/.svn/text-base/tc08_hbl2.c.svn-base b/helgrind/tests/.svn/text-base/tc08_hbl2.c.svn-base new file mode 100644 index 0000000..d67435a --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc08_hbl2.c.svn-base @@ -0,0 +1,117 @@ + +/* FIXME: this is basically a bad test as it is scheduling- + sensitive. Sometimes the output is: + + child: new value 6 + child: new value 10 + done, x = 10 + + and sometimes + + child: new value 10 + done, x = 10 +*/ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + +/* Simple test program, no race. Parent writes atomically to a counter + whilst child reads it. When counter reaches a prearranged value, + child joins back to parent. Parent (writer) uses hardware bus lock; + child is only reading and so does not need to use a bus lock. */ + + +#undef PLAT_x86_linux +#undef PLAT_amd64_linux +#undef PLAT_ppc32_linux +#undef PLAT_ppc64_linux +#undef PLAT_ppc32_aix5 +#undef PLAT_ppc64_aix5 + +#if !defined(_AIX) && defined(__i386__) +# define PLAT_x86_linux 1 +#elif !defined(_AIX) && defined(__x86_64__) +# define PLAT_amd64_linux 1 +#elif !defined(_AIX) && defined(__powerpc__) && !defined(__powerpc64__) +# define PLAT_ppc32_linux 1 +#elif !defined(_AIX) && defined(__powerpc__) && defined(__powerpc64__) +# define PLAT_ppc64_linux 1 +#elif defined(_AIX) && defined(__64BIT__) +# define PLAT_ppc64_aix5 1 +#elif defined(_AIX) && !defined(__64BIT__) +# define PLAT_ppc32_aix5 1 +#endif + +#if defined(PLAT_amd64_linux) || defined(PLAT_x86_linux) +# define INC(_lval,_lqual) \ + __asm__ __volatile__ ( \ + "lock ; incl (%0)" : /*out*/ : /*in*/"r"(&(_lval)) : "memory", "cc" ) +#elif defined(PLAT_ppc32_linux) || defined(PLAT_ppc64_linux) \ + || defined(PLAT_ppc32_aix5) || defined(PLAT_ppc64_aix5) +# define INC(_lval,_lqual) \ + __asm__ __volatile__( \ + "L1xyzzy1" _lqual ":\n" \ + " lwarx 15,0,%0\n" \ + " addi 15,15,1\n" \ + " stwcx. 15,0,%0\n" \ + " bne- L1xyzzy1" _lqual \ + : /*out*/ : /*in*/ "b"(&(_lval)) \ + : /*trash*/ "r15", "cr0", "memory" \ + ) +#else +# error "Fix Me for this platform" +#endif + + + +#define LIMIT 10 + +volatile int x = 0; + +void* child_fn ( void* arg ) +{ + int q = 0; + int oldx = 0; + int ctr = 0; + while (1) { + q = (x >= LIMIT); + if (x != oldx) { + oldx = x; + printf("child: new value %d\n", oldx); + fflush(stdout); + } + if (q) break; + /* Make sure the parent doesn't starve. Seems to be a problem + on very slow machines. */ + ctr++; + if (ctr == 2000000) sleep(1); + } + return NULL; +} + +int main ( void ) +{ + pthread_t child; + int i; + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + for (i = 0; i < LIMIT; i++) { + INC(x, "main"); + if (i == 5) sleep(1); /* make sure child doesn't starve */ + } + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + printf("done, x = %d\n", x); + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc08_hbl2.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc08_hbl2.stderr.exp.svn-base new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc08_hbl2.stderr.exp.svn-base @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc08_hbl2.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc08_hbl2.stdout.exp.svn-base new file mode 100644 index 0000000..ce39ad5 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc08_hbl2.stdout.exp.svn-base @@ -0,0 +1,3 @@ +child: new value 6 +child: new value 10 +done, x = 10 diff --git a/helgrind/tests/.svn/text-base/tc08_hbl2.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc08_hbl2.vgtest.svn-base new file mode 100644 index 0000000..6d0a2cb --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc08_hbl2.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc08_hbl2 diff --git a/helgrind/tests/.svn/text-base/tc09_bad_unlock.c.svn-base b/helgrind/tests/.svn/text-base/tc09_bad_unlock.c.svn-base new file mode 100644 index 0000000..238ce9b --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc09_bad_unlock.c.svn-base @@ -0,0 +1,52 @@ + +/* Check that an error is reported for various kinds of bogus + pthread_mutex_unlock calls. */ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +void* child_fn ( void* arg ) +{ + pthread_mutex_unlock( (pthread_mutex_t*)arg ); /* ERROR */ + return NULL; +} + +void nearly_main ( void ) +{ + pthread_t child; + pthread_mutex_t mx1, mx2; + int bogus[100], i; + /* fill bogus with values which will cause glibc's pth_mx_unlock to fail */ + for (i = 0; i < 100; i++) bogus[i] = 0xFFFFFFFF; + /* Unlocking a lock that is already unlocked */ + pthread_mutex_init( &mx1, NULL ); + pthread_mutex_lock( &mx1 ); + pthread_mutex_unlock( &mx1 ); + + pthread_mutex_unlock( &mx1 ); /* ERROR */ + + /* Unlocking a lock that is held by a different thread */ + + pthread_mutex_init( &mx2, NULL ); + pthread_mutex_lock( &mx2 ); + // start child and get it to unlock this lock + + pthread_create( &child, NULL, child_fn, (void*)&mx2 ); + /* child runs and attempts to unlock our lock. Error + is reported in child_fn. */ + pthread_join(child, NULL ); + + /* Unlocking a totally bogus lock. */ + pthread_mutex_unlock( (pthread_mutex_t*) &bogus[50] ); /* ERROR */ + + /* Now we get a freeing-locked-lock error, since the stack + frame is removed whilst mx2 is still locked. */ +} + +int main ( void ) +{ + nearly_main(); fprintf(stderr, "---------------------\n" ); + nearly_main(); + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc09_bad_unlock.stderr.exp-glibc23-amd64.svn-base b/helgrind/tests/.svn/text-base/tc09_bad_unlock.stderr.exp-glibc23-amd64.svn-base new file mode 100644 index 0000000..d78d98a --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc09_bad_unlock.stderr.exp-glibc23-amd64.svn-base @@ -0,0 +1,80 @@ + +Thread #x is the program's root thread + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:27) + by 0x........: main (tc09_bad_unlock.c:49) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:23) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:35) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked lock at 0x........ currently held by thread #x + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: child_fn (tc09_bad_unlock.c:11) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x deallocated location 0x........ containing a locked lock + at 0x........: nearly_main (tc09_bad_unlock.c:45) + by 0x........: main (tc09_bad_unlock.c:49) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:27) + by 0x........: main (tc09_bad_unlock.c:50) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:23) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:35) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x unlocked lock at 0x........ currently held by thread #x + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: child_fn (tc09_bad_unlock.c:11) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x deallocated location 0x........ containing a locked lock + at 0x........: nearly_main (tc09_bad_unlock.c:45) + by 0x........: main (tc09_bad_unlock.c:50) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:50) + +ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc09_bad_unlock.stderr.exp-glibc25-amd64.svn-base b/helgrind/tests/.svn/text-base/tc09_bad_unlock.stderr.exp-glibc25-amd64.svn-base new file mode 100644 index 0000000..51ff990 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc09_bad_unlock.stderr.exp-glibc25-amd64.svn-base @@ -0,0 +1,90 @@ + +Thread #x is the program's root thread + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:27) + by 0x........: main (tc09_bad_unlock.c:49) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:23) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:35) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked lock at 0x........ currently held by thread #x + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: child_fn (tc09_bad_unlock.c:11) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x's call to pthread_mutex_unlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:49) +--------------------- + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:27) + by 0x........: main (tc09_bad_unlock.c:50) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:23) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x: Attempt to re-lock a non-recursive lock I already hold + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:32) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x: Bug in libpthread: recursive write lock granted on mutex/wrlock which does not support recursion + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:32) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:35) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x unlocked lock at 0x........ currently held by thread #x + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: child_fn (tc09_bad_unlock.c:11) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x's call to pthread_mutex_unlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x: Exiting thread still holds 1 lock + ... + +ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc09_bad_unlock.stderr.exp-glibc25-x86.svn-base b/helgrind/tests/.svn/text-base/tc09_bad_unlock.stderr.exp-glibc25-x86.svn-base new file mode 100644 index 0000000..1e53aa6 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc09_bad_unlock.stderr.exp-glibc25-x86.svn-base @@ -0,0 +1,92 @@ + +Thread #x is the program's root thread + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:27) + by 0x........: main (tc09_bad_unlock.c:49) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:23) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:35) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked lock at 0x........ currently held by thread #x + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: child_fn (tc09_bad_unlock.c:11) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x's call to pthread_mutex_unlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x deallocated location 0x........ containing a locked lock + at 0x........: nearly_main (tc09_bad_unlock.c:45) + by 0x........: main (tc09_bad_unlock.c:49) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:27) + by 0x........: main (tc09_bad_unlock.c:50) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:23) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:35) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x unlocked lock at 0x........ currently held by thread #x + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: child_fn (tc09_bad_unlock.c:11) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x's call to pthread_mutex_unlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x deallocated location 0x........ containing a locked lock + at 0x........: nearly_main (tc09_bad_unlock.c:45) + by 0x........: main (tc09_bad_unlock.c:50) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:50) + +ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc09_bad_unlock.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc09_bad_unlock.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc09_bad_unlock.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc09_bad_unlock.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc09_bad_unlock.vgtest.svn-base new file mode 100644 index 0000000..d09a702 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc09_bad_unlock.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc09_bad_unlock diff --git a/helgrind/tests/.svn/text-base/tc10_rec_lock.c.svn-base b/helgrind/tests/.svn/text-base/tc10_rec_lock.c.svn-base new file mode 100644 index 0000000..648305c --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc10_rec_lock.c.svn-base @@ -0,0 +1,49 @@ + +/* Do simple things with a recursive mutex. */ + +/* Needed for older glibcs (2.3 and older, at least) who don't + otherwise "know" about pthread_rwlock_anything or about + PTHREAD_MUTEX_RECURSIVE (amongst things). */ +#define _GNU_SOURCE 1 + +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <pthread.h> + +void nearly_main ( void ) +{ + pthread_mutex_t mx1; + pthread_mutexattr_t attr; + int r; + + r = pthread_mutexattr_init( &attr ); + assert(r==0); + r = pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE ); + assert(r==0); + r = pthread_mutex_init( &mx1, &attr ); + assert(r==0); + + fprintf(stderr, "before lock #1\n"); + r = pthread_mutex_lock( &mx1 ); assert(r == 0); + fprintf(stderr, "before lock #2\n"); + r = pthread_mutex_lock( &mx1 ); assert(r == 0); + fprintf(stderr, "before lock #3\n"); + r = pthread_mutex_lock( &mx1 ); assert(r == 0); + + fprintf(stderr, "before unlock #1\n"); + r = pthread_mutex_unlock( &mx1 ); assert(r == 0); + fprintf(stderr, "before unlock #2\n"); + r = pthread_mutex_unlock( &mx1 ); assert(r == 0); + fprintf(stderr, "before unlock #3\n"); + r = pthread_mutex_unlock( &mx1 ); assert(r == 0); + + fprintf(stderr, "before unlock #4\n"); + r = pthread_mutex_unlock( &mx1 ); /* FAILS: assert(r == 0); */ +} + +int main ( void ) +{ + nearly_main(); + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc10_rec_lock.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc10_rec_lock.stderr.exp.svn-base new file mode 100644 index 0000000..7e65ba7 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc10_rec_lock.stderr.exp.svn-base @@ -0,0 +1,26 @@ + +before lock #1 +before lock #2 +before lock #3 +before unlock #1 +before unlock #2 +before unlock #3 +before unlock #4 +Thread #x is the program's root thread + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc10_rec_lock.c:42) + by 0x........: main (tc10_rec_lock.c:47) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc10_rec_lock.c:24) + by 0x........: main (tc10_rec_lock.c:47) + +Thread #x's call to pthread_mutex_unlock failed + with error code 1 (EPERM: Operation not permitted) + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc10_rec_lock.c:42) + by 0x........: main (tc10_rec_lock.c:47) + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc10_rec_lock.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc10_rec_lock.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc10_rec_lock.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc10_rec_lock.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc10_rec_lock.vgtest.svn-base new file mode 100644 index 0000000..bfd0f89 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc10_rec_lock.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc10_rec_lock diff --git a/helgrind/tests/.svn/text-base/tc11_XCHG.c.svn-base b/helgrind/tests/.svn/text-base/tc11_XCHG.c.svn-base new file mode 100644 index 0000000..22c6baf --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc11_XCHG.c.svn-base @@ -0,0 +1,112 @@ + +#include "config.h" +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> + +/* Simple test program, no race. Parent and child both modify x and + use the hardware bus lock (implicitly, since XCHG r,m on x86/amd64 + does not require an explicit LOCK prefix.). */ + +#undef PLAT_x86_linux +#undef PLAT_amd64_linux +#undef PLAT_ppc32_linux +#undef PLAT_ppc64_linux +#undef PLAT_ppc32_aix5 +#undef PLAT_ppc64_aix5 + +#if !defined(_AIX) && defined(__i386__) +# define PLAT_x86_linux 1 +#elif !defined(_AIX) && defined(__x86_64__) +# define PLAT_amd64_linux 1 +#elif !defined(_AIX) && defined(__powerpc__) && !defined(__powerpc64__) +# define PLAT_ppc32_linux 1 +#elif !defined(_AIX) && defined(__powerpc__) && defined(__powerpc64__) +# define PLAT_ppc64_linux 1 +#elif defined(_AIX) && defined(__64BIT__) +# define PLAT_ppc64_aix5 1 +#elif defined(_AIX) && !defined(__64BIT__) +# define PLAT_ppc32_aix5 1 +#endif + + +#if defined(PLAT_amd64_linux) || defined(PLAT_x86_linux) +# define XCHG_M_R(_addr,_lval) \ + __asm__ __volatile__( \ + "xchgl %0, %1" \ + : /*out*/ "+r"(_lval) \ + : /*in*/ "m"(_addr) \ + : "memory", "cc" \ + ) +# define XCHG_M_R_with_redundant_LOCK(_addr,_lval) \ + __asm__ __volatile__( \ + "lock xchgl %0, %1" \ + : /*out*/ "+r"(_lval) \ + : /*in*/ "m"(_addr) \ + : "memory", "cc" \ + ) + +#elif defined(PLAT_ppc32_linux) || defined(PLAT_ppc64_linux) \ + || defined(PLAT_ppc32_aix5) || defined(PLAT_ppc64_aix5) +# if defined(HAVE_BUILTIN_ATOMIC) +# define XCHG_M_R(_addr,_lval) \ + do { \ + int tmp; \ + while ((tmp = *(int*)(& _addr)), \ + ! __sync_bool_compare_and_swap((int*)&_addr, tmp, _lval)) \ + ; \ + _lval = tmp; \ + } while (0) +# else +# warning "XCHG_M_R() implementation is missing. Either" \ + "provide one or use a newer gcc version." +# define XCHG_M_R(_addr,_lval) \ + do { int tmp = *(int*)(& _addr); \ + *(int*)(& _addr) = (_lval); \ + _lval = tmp; \ + } while (0) +# endif +# define XCHG_M_R_with_redundant_LOCK(_addr,_lval) \ + XCHG_M_R(_addr,_lval) + +#else +# error "Unsupported architecture" + +#endif + +int x = 0; + +void* child_fn ( void* arg ) +{ + int v = 12345; + XCHG_M_R_with_redundant_LOCK(x, v); + assert(v == 0 || v == 6789); + return NULL; +} + +int main ( void ) +{ + int v = 6789; + pthread_t child; + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + XCHG_M_R(x, v); + assert(v == 0 || v == 12345); + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + if (v == 0 || v == 12345) + printf("success\n"); + else + printf("failure\n"); + + return v; +} diff --git a/helgrind/tests/.svn/text-base/tc11_XCHG.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc11_XCHG.stderr.exp.svn-base new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc11_XCHG.stderr.exp.svn-base @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc11_XCHG.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc11_XCHG.stdout.exp.svn-base new file mode 100644 index 0000000..2e9ba47 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc11_XCHG.stdout.exp.svn-base @@ -0,0 +1 @@ +success diff --git a/helgrind/tests/.svn/text-base/tc11_XCHG.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc11_XCHG.vgtest.svn-base new file mode 100644 index 0000000..342199b --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc11_XCHG.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc11_XCHG diff --git a/helgrind/tests/.svn/text-base/tc12_rwl_trivial.c.svn-base b/helgrind/tests/.svn/text-base/tc12_rwl_trivial.c.svn-base new file mode 100644 index 0000000..9dc8e84 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc12_rwl_trivial.c.svn-base @@ -0,0 +1,34 @@ + +/* Needed for older glibcs (2.3 and older, at least) who don't + otherwise "know" about pthread_rwlock_anything or about + PTHREAD_MUTEX_RECURSIVE (amongst things). */ +#define _GNU_SOURCE 1 + +#include <stdio.h> +#include <pthread.h> +#include <assert.h> + +/* Do trivial stuff with a reader-writer lock. */ + +int main ( void ) +{ + int r; + pthread_rwlock_t rwl; + + r = pthread_rwlock_init( &rwl, NULL ); assert(r == 0); + + r = pthread_rwlock_wrlock( &rwl ); assert(r == 0); + r = pthread_rwlock_unlock( &rwl ); assert(r == 0); + + r = pthread_rwlock_rdlock( &rwl ); assert(r == 0); + r = pthread_rwlock_rdlock( &rwl ); assert(r == 0); + r = pthread_rwlock_unlock( &rwl ); assert(r == 0); + r = pthread_rwlock_unlock( &rwl ); assert(r == 0); + + /* this should fail - lock is unowned now */ + r = pthread_rwlock_unlock( &rwl ); assert(r == 0); + + r = pthread_rwlock_destroy( &rwl ); assert(r == 0); + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc12_rwl_trivial.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc12_rwl_trivial.stderr.exp.svn-base new file mode 100644 index 0000000..5d4f383 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc12_rwl_trivial.stderr.exp.svn-base @@ -0,0 +1,11 @@ + +Thread #x is the program's root thread + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) + by 0x........: main (tc12_rwl_trivial.c:29) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (hg_intercepts.c:...) + by 0x........: main (tc12_rwl_trivial.c:18) + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc12_rwl_trivial.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc12_rwl_trivial.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc12_rwl_trivial.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc12_rwl_trivial.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc12_rwl_trivial.vgtest.svn-base new file mode 100644 index 0000000..fdcd644 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc12_rwl_trivial.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc12_rwl_trivial diff --git a/helgrind/tests/.svn/text-base/tc13_laog1.c.svn-base b/helgrind/tests/.svn/text-base/tc13_laog1.c.svn-base new file mode 100644 index 0000000..e42ca98 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc13_laog1.c.svn-base @@ -0,0 +1,33 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> + +/* The simplest possible test that triggers a lock order acquisition + error. */ + +int main ( void ) +{ + int r; + pthread_mutex_t mx1, mx2; + r = pthread_mutex_init( &mx1, NULL ); assert(r==0); + r = pthread_mutex_init( &mx2, NULL ); assert(r==0); + + r = pthread_mutex_lock( &mx1 ); assert(r==0); + r = pthread_mutex_lock( &mx2 ); assert(r==0); + + r = pthread_mutex_unlock( &mx1 ); assert(r==0); + r = pthread_mutex_unlock( &mx2 ); assert(r==0); + + r = pthread_mutex_lock( &mx2 ); assert(r==0); /* error */ + r = pthread_mutex_lock( &mx1 ); assert(r==0); + + r = pthread_mutex_unlock( &mx1 ); assert(r==0); + r = pthread_mutex_unlock( &mx2 ); assert(r==0); + + r = pthread_mutex_destroy( &mx1 ); + r = pthread_mutex_destroy( &mx2 ); + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc13_laog1.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc13_laog1.stderr.exp.svn-base new file mode 100644 index 0000000..643aef9 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc13_laog1.stderr.exp.svn-base @@ -0,0 +1,14 @@ + +Thread #x is the program's root thread + +Thread #x: lock order "0x........ before 0x........" violated + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc13_laog1.c:24) + Required order was established by acquisition of lock at 0x........ + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc13_laog1.c:17) + followed by a later acquisition of lock at 0x........ + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc13_laog1.c:18) + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc13_laog1.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc13_laog1.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc13_laog1.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc13_laog1.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc13_laog1.vgtest.svn-base new file mode 100644 index 0000000..9fa71cd --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc13_laog1.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc13_laog1 diff --git a/helgrind/tests/.svn/text-base/tc14_laog_dinphils.c.svn-base b/helgrind/tests/.svn/text-base/tc14_laog_dinphils.c.svn-base new file mode 100644 index 0000000..c5af8c1 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc14_laog_dinphils.c.svn-base @@ -0,0 +1,42 @@ + +#include <pthread.h> +#include <stdlib.h> +#include <unistd.h> + +/* Naive dining philosophers with inconsistent lock acquisition + ordering. */ + +static pthread_t phil[5]; +static pthread_mutex_t chop[5]; + +void* dine ( void* arg ) +{ + int i; + long left = (long)arg; + long right = (left + 1) % 5; + for (i = 0; i < 1000/*arbitrary*/; i++) { + pthread_mutex_lock(&chop[left]); + pthread_mutex_lock(&chop[right]); + /* eating */ + pthread_mutex_unlock(&chop[left]); + pthread_mutex_unlock(&chop[right]); + } + return NULL; +} + +int main ( void ) +{ + long i; + for (i = 0; i < 5; i++) + pthread_mutex_init( &chop[i], NULL); + + for (i = 0; i < 5; i++) + pthread_create(&phil[i], NULL, dine, (void*)i ); + + sleep(1); + + for (i = 0; i < 5; i++) + pthread_join(phil[i], NULL); + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc14_laog_dinphils.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc14_laog_dinphils.stderr.exp.svn-base new file mode 100644 index 0000000..f2e710f --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc14_laog_dinphils.stderr.exp.svn-base @@ -0,0 +1,13 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc14_laog_dinphils.c:34) + +Thread #x: lock order "0x........ before 0x........" violated + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: dine (tc14_laog_dinphils.c:19) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +ERROR SUMMARY: 1000 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc14_laog_dinphils.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc14_laog_dinphils.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc14_laog_dinphils.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc14_laog_dinphils.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc14_laog_dinphils.vgtest.svn-base new file mode 100644 index 0000000..5871b73 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc14_laog_dinphils.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc14_laog_dinphils diff --git a/helgrind/tests/.svn/text-base/tc15_laog_lockdel.c.svn-base b/helgrind/tests/.svn/text-base/tc15_laog_lockdel.c.svn-base new file mode 100644 index 0000000..68668b1 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc15_laog_lockdel.c.svn-base @@ -0,0 +1,77 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> + +/* Test that locks, having entered the lock acquisition tracking + machinery, are forgotten by it when the client does + pthread_{mutex,rwlock}_destroy. 2008-Nov-10: see comments below. */ + +int main ( void ) +{ + int r; + pthread_mutex_t *mx1, *mx2; + + mx1 = malloc(sizeof(pthread_mutex_t)); + mx2 = malloc(sizeof(pthread_mutex_t)); + + assert(mx1); + assert(mx2); + + r = pthread_mutex_init( mx1, NULL ); assert(r==0); + r = pthread_mutex_init( mx2, NULL ); assert(r==0); + + /* Establish order 1 -> 2 */ + fprintf(stderr, "Establish order 1 -> 2\n"); + r = pthread_mutex_lock( mx1 ); assert(r==0); + r = pthread_mutex_lock( mx2 ); assert(r==0); + + r = pthread_mutex_unlock( mx1 ); assert(r==0); + r = pthread_mutex_unlock( mx2 ); assert(r==0); + + /* Try order 2 -> 1. This gives an error. */ + fprintf(stderr, "Try order 2 -> 1. This gives an error.\n"); + r = pthread_mutex_lock( mx2 ); assert(r==0); /* error */ + r = pthread_mutex_lock( mx1 ); assert(r==0); + + r = pthread_mutex_unlock( mx1 ); assert(r==0); + r = pthread_mutex_unlock( mx2 ); assert(r==0); + + /* De-initialise 2 and re-initialise it. This gives it a new + identity, so a second locking sequence 2 -> 1 should now be OK. */ + fprintf(stderr, + "Free 2 and re-allocate it. This gives it a new identity,\n"); + fprintf(stderr, "so a second locking sequence 2 -> 1 should now be OK.\n"); + pthread_mutex_destroy( mx2 ); + + + + r = pthread_mutex_init( mx2, NULL ); assert(r==0); + + r = pthread_mutex_lock( mx2 ); assert(r==0); + r = pthread_mutex_lock( mx1 ); assert(r==0); /* no error */ + + r = pthread_mutex_unlock( mx1 ); assert(r==0); + r = pthread_mutex_unlock( mx2 ); assert(r==0); + + /* done */ + + fprintf(stderr, "done\n"); + r = pthread_mutex_destroy( mx1 ); + r = pthread_mutex_destroy( mx2 ); + + free( mx1 ); + free( mx2 ); + + return 0; +} + +/* 2008-Nov-10: I believe this test is flawed and requires further + investigation. I don't think it really tests what it claims to + test. In particular, it still gives the right results if + "pthread_mutex_destroy( mx2 );" at line 46 is commented out. In + other words, laog somehow forgets about mx2 so that 2->1 lock + sequence at lines 52/3 does not produce a complaint, EVEN WHEN the + preceding "pthread_mutex_destroy( mx2 );" is not observed. I don't + know why this is, but it seems highly suspicious to me. */ diff --git a/helgrind/tests/.svn/text-base/tc15_laog_lockdel.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc15_laog_lockdel.stderr.exp.svn-base new file mode 100644 index 0000000..cf7fce9 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc15_laog_lockdel.stderr.exp.svn-base @@ -0,0 +1,19 @@ + +Establish order 1 -> 2 +Try order 2 -> 1. This gives an error. +Thread #x is the program's root thread + +Thread #x: lock order "0x........ before 0x........" violated + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc15_laog_lockdel.c:36) + Required order was established by acquisition of lock at 0x........ + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc15_laog_lockdel.c:27) + followed by a later acquisition of lock at 0x........ + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc15_laog_lockdel.c:28) +Free 2 and re-allocate it. This gives it a new identity, +so a second locking sequence 2 -> 1 should now be OK. +done + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc15_laog_lockdel.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc15_laog_lockdel.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc15_laog_lockdel.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc15_laog_lockdel.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc15_laog_lockdel.vgtest.svn-base new file mode 100644 index 0000000..bd7a2ec --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc15_laog_lockdel.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc15_laog_lockdel diff --git a/helgrind/tests/.svn/text-base/tc16_byterace.c.svn-base b/helgrind/tests/.svn/text-base/tc16_byterace.c.svn-base new file mode 100644 index 0000000..70a9101 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc16_byterace.c.svn-base @@ -0,0 +1,42 @@ +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +/* Simple demonstration of lockset tracking at byte granularity. */ + +char bytes[10]; + +void* child_fn ( void* arg ) +{ + int i; + for (i = 0; i < 5; i++) + bytes[2*i + 0] ++; /* child accesses: 0 2 4 6 8 */ + return NULL; +} + +int main ( void ) +{ + int i; + pthread_t child; + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + /* Unprotected relative to child, but harmless, since different + bytes accessed */ + for (i = 0; i < 5; i++) + bytes[2*i + 1] ++; /* accesses: 1 3 5 7 9 */ + + /* Unprotected relative to child, but harmful; same bytes */ + for (i = 0; i < 3; i++) + bytes[3*i + 1] ++; /* accesses: 1 4(race!) 7 */ + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc16_byterace.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc16_byterace.stderr.exp.svn-base new file mode 100644 index 0000000..95d0011 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc16_byterace.stderr.exp.svn-base @@ -0,0 +1,27 @@ + +Thread #x is the program's root thread + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc16_byterace.c:22) + +Possible data race during read of size 1 at 0x........ by thread #x + at 0x........: main (tc16_byterace.c:34) + This conflicts with a previous write of size 1 by thread #x + at 0x........: child_fn (tc16_byterace.c:13) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside bytes[4], + a global variable declared at tc16_byterace.c:7 + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: main (tc16_byterace.c:34) + This conflicts with a previous write of size 1 by thread #x + at 0x........: child_fn (tc16_byterace.c:13) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside bytes[4], + a global variable declared at tc16_byterace.c:7 + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc16_byterace.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc16_byterace.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc16_byterace.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc16_byterace.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc16_byterace.vgtest.svn-base new file mode 100644 index 0000000..0b424a4 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc16_byterace.vgtest.svn-base @@ -0,0 +1,2 @@ +prog: tc16_byterace +vgopts: --read-var-info=yes diff --git a/helgrind/tests/.svn/text-base/tc17_sembar.c.svn-base b/helgrind/tests/.svn/text-base/tc17_sembar.c.svn-base new file mode 100644 index 0000000..cc91f5e --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc17_sembar.c.svn-base @@ -0,0 +1,213 @@ + +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <pthread.h> +#include <semaphore.h> + +/* This is really a test of semaphore handling + (sem_{init,destroy,post,wait}). Using semaphores a barrier + function is created. Helgrind-3.3 (p.k.a Thrcheck) does understand + the barrier semantics implied by the barrier, as pieced together + from happens-before relationships obtained from the component + semaphores. However, it does falsely report one race. Ah well. + Helgrind-3.4 is pure h-b and so reports no races (yay!). */ + +/* This code is derived from + gcc-4.3-20071012/libgomp/config/posix/bar.c, which is + + Copyright (C) 2005 Free Software Foundation, Inc. + Contributed by Richard Henderson <rth@redhat.com>. + + and available under version 2.1 or later of the GNU Lesser General + Public License. + + Relative to the libgomp sources, the gomp_barrier_t type here has + an extra semaphore field, xxx. This is not functionally useful, + but it is used to create enough extra inter-thread dependencies + that the barrier-like behaviour of gomp_barrier_t is evident to + Thrcheck. There is no other purpose for the .xxx field. */ + +typedef struct +{ + pthread_mutex_t mutex1; + pthread_mutex_t mutex2; + sem_t sem1; + sem_t sem2; + unsigned total; + unsigned arrived; + sem_t xxx; +} gomp_barrier_t; + +typedef long bool; + +void +gomp_barrier_init (gomp_barrier_t *bar, unsigned count) +{ + pthread_mutex_init (&bar->mutex1, NULL); + pthread_mutex_init (&bar->mutex2, NULL); + sem_init (&bar->sem1, 0, 0); + sem_init (&bar->sem2, 0, 0); + sem_init (&bar->xxx, 0, 0); + bar->total = count; + bar->arrived = 0; +} + +void +gomp_barrier_destroy (gomp_barrier_t *bar) +{ + /* Before destroying, make sure all threads have left the barrier. */ + pthread_mutex_lock (&bar->mutex1); + pthread_mutex_unlock (&bar->mutex1); + + pthread_mutex_destroy (&bar->mutex1); + pthread_mutex_destroy (&bar->mutex2); + sem_destroy (&bar->sem1); + sem_destroy (&bar->sem2); + sem_destroy(&bar->xxx); +} + +void +gomp_barrier_reinit (gomp_barrier_t *bar, unsigned count) +{ + pthread_mutex_lock (&bar->mutex1); + bar->total = count; + pthread_mutex_unlock (&bar->mutex1); +} + +void +gomp_barrier_wait (gomp_barrier_t *bar) +{ + unsigned int n; + pthread_mutex_lock (&bar->mutex1); + + ++bar->arrived; + + if (bar->arrived == bar->total) + { + bar->arrived--; + n = bar->arrived; + if (n > 0) + { + { unsigned int i; + for (i = 0; i < n; i++) + sem_wait(&bar->xxx); // acquire an obvious dependency from + // all other threads arriving at the barrier + } + // 1 up n times, 2 down once + // now let all the other threads past the barrier, giving them + // an obvious dependency with this thread. + do + sem_post (&bar->sem1); // 1 up + while (--n != 0); + // and wait till the last thread has left + sem_wait (&bar->sem2); // 2 down + } + pthread_mutex_unlock (&bar->mutex1); + /* «Résultats professionnels!» First we made this thread have an + obvious (Thrcheck-visible) dependency on all other threads + calling gomp_barrier_wait. Then, we released them all again, + so they all have a (visible) dependency on this thread. + Transitively, the result is that all threads leaving the + barrier have a a Thrcheck-visible dependency on all threads + arriving at the barrier. As required. */ + } + else + { + pthread_mutex_unlock (&bar->mutex1); + sem_post(&bar->xxx); + // first N-1 threads wind up waiting here + sem_wait (&bar->sem1); // 1 down + + pthread_mutex_lock (&bar->mutex2); + n = --bar->arrived; /* XXX see below */ + pthread_mutex_unlock (&bar->mutex2); + + if (n == 0) + sem_post (&bar->sem2); // 2 up + } +} + + +/* re XXX, thrcheck reports a race at this point. It doesn't + understand that bar->arrived is protected by mutex1 whilst threads + are arriving at the barrier and by mutex2 whilst they are leaving, + but not consistently by either of them. Oh well. */ + +static gomp_barrier_t bar; + +/* What's with the volatile here? It stops gcc compiling + "if (myid == 4) { unprotected = 99; }" and + "if (myid == 3) { unprotected = 88; }" into a conditional + load followed by a store. The cmov/store sequence reads and + writes memory in all threads and cause Thrcheck to (correctly) + report a race, the underlying cause of which is that gcc is + generating non threadsafe code. + + (The lack of) thread safe code generation by gcc is currently a + hot topic. See the following discussions: + http://gcc.gnu.org/ml/gcc/2007-10/msg00266.html + http://lkml.org/lkml/2007/10/24/673 + and this is interesting background: + www.hpl.hp.com/techreports/2004/HPL-2004-209.pdf +*/ +static volatile long unprotected = 0; + +void* child ( void* argV ) +{ + long myid = (long)argV; + // assert(myid >= 2 && myid <= 5); + + /* First, we all wait to get to this point. */ + gomp_barrier_wait( &bar ); + + /* Now, thread #4 writes to 'unprotected' and so becomes its + owner. */ + if (myid == 4) { + unprotected = 99; + } + + /* Now we all wait again. */ + gomp_barrier_wait( &bar ); + + /* This time, thread #3 writes to 'unprotected'. If all goes well, + Thrcheck sees the dependency through the barrier back to thread + #4 before it, and so thread #3 becomes the exclusive owner of + 'unprotected'. */ + if (myid == 3) { + unprotected = 88; + } + + /* And just to be on the safe side ... */ + gomp_barrier_wait( &bar ); + return NULL; +} + + +int main (int argc, char *argv[]) +{ + long i; int res; + pthread_t thr[4]; + fprintf(stderr, "starting\n"); + + gomp_barrier_init( &bar, 4 ); + + for (i = 0; i < 4; i++) { + res = pthread_create( &thr[i], NULL, child, (void*)(i+2) ); + assert(!res); + } + + for (i = 0; i < 4; i++) { + res = pthread_join( thr[i], NULL ); + assert(!res); + } + + gomp_barrier_destroy( &bar ); + + /* And finally here, the root thread can get exclusive ownership + back from thread #4, because #4 has exited by this point and so + we have a dependency edge back to the write it did. */ + fprintf(stderr, "done, result is %ld, should be 88\n", unprotected); + + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc17_sembar.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc17_sembar.stderr.exp.svn-base new file mode 100644 index 0000000..b3f318e --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc17_sembar.stderr.exp.svn-base @@ -0,0 +1,5 @@ + +starting +done, result is 88, should be 88 + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc17_sembar.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc17_sembar.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc17_sembar.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc17_sembar.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc17_sembar.vgtest.svn-base new file mode 100644 index 0000000..643ed8a --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc17_sembar.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc17_sembar diff --git a/helgrind/tests/.svn/text-base/tc18_semabuse.c.svn-base b/helgrind/tests/.svn/text-base/tc18_semabuse.c.svn-base new file mode 100644 index 0000000..40c068b --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc18_semabuse.c.svn-base @@ -0,0 +1,57 @@ + +/* Do stupid things with semaphores, and check that Thrcheck doesn't + fall over and does report errors appropriately. If nothing else + this just checks that the relevant functions are getting + intercepted. */ + +/* This is pretty lame, because making the sem_ functions fail is + difficult. Not sure it's really worth having. */ +#include <unistd.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <pthread.h> +#include <semaphore.h> +#include <string.h> +void start_watchdog ( void ); +int main ( void ) +{ + int r; + sem_t s1; + start_watchdog(); + /* Do sem_init with huge initial count */ + r= sem_init(&s1, 0, ~0); + + /* initialise properly */ + r= sem_init(&s1, 0, 0); + + /* in glibc, sem_destroy is a no-op; making it fail is + impossible. */ + + /* Do 'wait' on a bogus semaphore. This should fail, but on glibc + it succeeds. */ + memset(&s1, 0x55, sizeof(s1)); + r= sem_wait(&s1); /* assert(r != 0); */ + + /* this only fails with glibc 2.7 and later. */ + r= sem_post(&s1); + + sem_destroy(&s1); + + return 0; +} + +void* watchdog ( void* v ) +{ + sleep(10); + fprintf(stderr, "watchdog timer expired - not a good sign\n"); + exit(0); +} + +void start_watchdog ( void ) +{ + pthread_t t; + int r; + r= pthread_create(&t, NULL, watchdog, NULL); + assert(!r); +} diff --git a/helgrind/tests/.svn/text-base/tc18_semabuse.stderr.exp-glibc25-amd64.svn-base b/helgrind/tests/.svn/text-base/tc18_semabuse.stderr.exp-glibc25-amd64.svn-base new file mode 100644 index 0000000..c2077ed --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc18_semabuse.stderr.exp-glibc25-amd64.svn-base @@ -0,0 +1,14 @@ + +Thread #x is the program's root thread + +Thread #x's call to sem_init failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: sem_init@* (hg_intercepts.c:...) + by 0x........: main (tc18_semabuse.c:23) + +Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post + at 0x........: sem_wait_WRK (hg_intercepts.c:...) + by 0x........: sem_wait (hg_intercepts.c:...) + by 0x........: main (tc18_semabuse.c:34) + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc18_semabuse.stderr.exp-glibc28-amd64.svn-base b/helgrind/tests/.svn/text-base/tc18_semabuse.stderr.exp-glibc28-amd64.svn-base new file mode 100644 index 0000000..ac8baaa --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc18_semabuse.stderr.exp-glibc28-amd64.svn-base @@ -0,0 +1,20 @@ + +Thread #x is the program's root thread + +Thread #x's call to sem_init failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: sem_init@* (hg_intercepts.c:...) + by 0x........: main (tc18_semabuse.c:23) + +Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post + at 0x........: sem_wait_WRK (hg_intercepts.c:...) + by 0x........: sem_wait (hg_intercepts.c:...) + by 0x........: main (tc18_semabuse.c:34) + +Thread #x's call to sem_post failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: sem_post_WRK (hg_intercepts.c:...) + by 0x........: sem_post (hg_intercepts.c:...) + by 0x........: main (tc18_semabuse.c:37) + +ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc18_semabuse.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc18_semabuse.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc18_semabuse.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc18_semabuse.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc18_semabuse.vgtest.svn-base new file mode 100644 index 0000000..fe4d22b --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc18_semabuse.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc18_semabuse diff --git a/helgrind/tests/.svn/text-base/tc19_shadowmem.c.svn-base b/helgrind/tests/.svn/text-base/tc19_shadowmem.c.svn-base new file mode 100644 index 0000000..ec05061 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc19_shadowmem.c.svn-base @@ -0,0 +1,2291 @@ + +#include <pthread.h> +#include <assert.h> +#include <stdlib.h> +#include <stdio.h> + +#include "helgrind/helgrind.h" + +typedef + struct { + void* (*child)(void*); + char* arr; + int firstoff; + int lastoff; + int skipoff; + } + Info; + +pthread_mutex_t mx; + +void* child8 ( void* infoV ) +{ + int r, i, firstoff, lastoff, skipoff; + char* arr; + Info* info = (Info*)infoV; + firstoff = info->firstoff; + lastoff = info->lastoff; + skipoff = info->skipoff; + arr = info->arr; + assert( sizeof(char) == 1 ); + assert( info->child == &child8 ); + { char* ptr = (char*)&arr[skipoff]; + *ptr = 0; } + for (i = firstoff; i <= lastoff; i += 1) { + char* ptr = (char*)&arr[i]; + if (i != skipoff) { + r= pthread_mutex_lock( &mx ); assert(!r); + *ptr = 0; + r= pthread_mutex_unlock( &mx ); assert(!r); + } + } + return NULL; +} + +void* child16 ( void* infoV ) +{ + int r, i, firstoff, lastoff, skipoff; + char* arr; + Info* info = (Info*)infoV; + firstoff = info->firstoff; + lastoff = info->lastoff; + skipoff = info->skipoff; + arr = info->arr; + assert( sizeof(short) == 2 ); + assert( info->child == &child16 ); + { short* ptr = (short*)&arr[skipoff]; + *ptr = 0; } + for (i = firstoff; i <= lastoff; i += 2) { + short* ptr = (short*)&arr[i]; + if (i != skipoff) { + r= pthread_mutex_lock( &mx ); assert(!r); + *ptr = 0; + r= pthread_mutex_unlock( &mx ); assert(!r); + } + } + return NULL; +} + +void* child32 ( void* infoV ) +{ + int r, i, firstoff, lastoff, skipoff; + char* arr; + Info* info = (Info*)infoV; + firstoff = info->firstoff; + lastoff = info->lastoff; + skipoff = info->skipoff; + arr = info->arr; + assert( sizeof(int) == 4 ); + assert( info->child == &child32 ); + { int* ptr = (int*)&arr[skipoff]; + *ptr = 0; } + for (i = firstoff; i <= lastoff; i += 4) { + int* ptr = (int*)&arr[i]; + if (i != skipoff) { + r= pthread_mutex_lock( &mx ); assert(!r); + *ptr = 0; + r= pthread_mutex_unlock( &mx ); assert(!r); + } + } + return NULL; +} + +void* child64 ( void* infoV ) +{ + int r, i, firstoff, lastoff, skipoff; + char* arr; + Info* info = (Info*)infoV; + firstoff = info->firstoff; + lastoff = info->lastoff; + skipoff = info->skipoff; + arr = info->arr; + assert( sizeof(double) == 8 ); + assert( info->child == &child64 ); + { double* ptr = (double*)&arr[skipoff]; + *ptr = 0.0; } + for (i = firstoff; i <= lastoff; i += 8) { + double* ptr = (double*)&arr[i]; + if (i != skipoff) { + r= pthread_mutex_lock( &mx ); assert(!r); + *ptr = 0.0; + r= pthread_mutex_unlock( &mx ); assert(!r); + } + } + return NULL; +} + + +void* steer ( void* infoV ); + +#define MAXXX 100 /* re 100: should cover at least 2 cycles +of length 1 << N_LINE_BITS */ +/* This is all a bit subtle. First, after every inner loop over the + data, we have to VALGRIND_TC_CLEAN_MEMORY it to get it back to a + decent starting state. Because info.arr is 8-aligned (is asserted + for), the address range painter will paint at top level granularity + (8-byte), which means we are guaranteed to see any errors from the + next iteration at the maximum granularity that their alignment + allows. + + Also, the pthread_joins cause the shadow mem cache to be flushed + each iteration. Given that all trees are pulled up to 64-bit by + the abovementioned VALGRIND_TC_CLEAN_MEMORY, I think this + irrelevant. +*/ + +int main ( void ) +{ + pthread_t t1, t2; + Info info; + int off; + + pthread_mutex_init( &mx, NULL ); + + info.arr = malloc(MAXXX); + assert(info.arr); + + /* ensure array is 8-aligned. this is important, as per comment + above. */ + assert(0 == (7 & (unsigned long)info.arr)); + +#if 1 + /* Test 8 bit granularity */ + + fprintf(stderr, "\n"); + fprintf(stderr, + "===========================================================\n"); + fprintf(stderr, + "=== 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 ===\n"); + fprintf(stderr, + "===========================================================\n"); + fprintf(stderr, "\n"); + for (off = 0; off < MAXXX-1; off++) { + + info.firstoff = off & 0; + info.lastoff = MAXXX - 1; + info.skipoff = off; + info.child = child8; + + fprintf(stderr, "---------- char gran, %d .. %d, skip %d ----------\n", + info.firstoff, info.lastoff, info.skipoff ); + + pthread_create( &t1, NULL, steer, (void*)&info ); + pthread_create( &t2, NULL, steer, (void*)&info ); + + pthread_join( t1, NULL ); + pthread_join( t2, NULL ); + + VALGRIND_HG_CLEAN_MEMORY(&info.arr[0], MAXXX); + + } +#endif +#if 1 + /* Test 16 bit granularity */ + + fprintf(stderr, "\n"); + fprintf(stderr, + "==========================================================\n"); + fprintf(stderr, + "=== 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 ===\n"); + fprintf(stderr, + "==========================================================\n"); + fprintf(stderr, "\n"); + for (off = 0; off < MAXXX-2; off++) { + + info.firstoff = off & 1; + info.lastoff = MAXXX - 2; + info.skipoff = off; + info.child = child16; + + fprintf(stderr, "---------- short gran, %d .. %d, skip %d ----------\n", + info.firstoff, info.lastoff, info.skipoff ); + + pthread_create( &t1, NULL, steer, (void*)&info ); + pthread_create( &t2, NULL, steer, (void*)&info ); + + pthread_join( t1, NULL ); + pthread_join( t2, NULL ); + + VALGRIND_HG_CLEAN_MEMORY(&info.arr[0], MAXXX); + + } +#endif +#if 1 + /* Test 32 bit granularity */ + + fprintf(stderr, "\n"); + fprintf(stderr, + "==========================================================\n"); + fprintf(stderr, + "=== 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 ===\n"); + fprintf(stderr, + "==========================================================\n"); + fprintf(stderr, "\n"); + for (off = 0; off < MAXXX-4; off++) { + + info.firstoff = off & 3; + info.lastoff = MAXXX - 4; + info.skipoff = off; + info.child = child32; + + fprintf(stderr, "---------- int gran, %d .. %d, skip %d ----------\n", + info.firstoff, info.lastoff, info.skipoff ); + + pthread_create( &t1, NULL, steer, (void*)&info ); + pthread_create( &t2, NULL, steer, (void*)&info ); + + pthread_join( t1, NULL ); + pthread_join( t2, NULL ); + + VALGRIND_HG_CLEAN_MEMORY(&info.arr[0], MAXXX); + + } +#endif +#if 1 + /* Test 64 bit granularity */ + + fprintf(stderr, "\n"); + fprintf(stderr, + "==========================================================\n"); + fprintf(stderr, + "=== 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 ===\n"); + fprintf(stderr, + "==========================================================\n"); + fprintf(stderr, "\n"); + for (off = 0; off < MAXXX-8; off++) { + + info.firstoff = off & 7; + info.lastoff = MAXXX - 8; + info.skipoff = off; + info.child = child64; + + fprintf(stderr, "---------- double gran, %d .. %d, skip %d ----------\n", + info.firstoff, info.lastoff, info.skipoff ); + + pthread_create( &t1, NULL, steer, (void*)&info ); + pthread_create( &t2, NULL, steer, (void*)&info ); + + pthread_join( t1, NULL ); + pthread_join( t2, NULL ); + + VALGRIND_HG_CLEAN_MEMORY(&info.arr[0], MAXXX); + + } +#endif + free(info.arr); + + return 0; +} + +void* steer ( void* infoV ) +{ + Info* info = (Info*)infoV; + int wot = info->skipoff; + void*(*fn)(void*) = info->child; + if (wot >= 500) goto halfway; + + __asm__ __volatile__(""); + if (wot == 0) return fn(info); + __asm__ __volatile__(""); + if (wot == 1) return fn(info); + __asm__ __volatile__(""); + if (wot == 2) return fn(info); + __asm__ __volatile__(""); + if (wot == 3) return fn(info); + __asm__ __volatile__(""); + if (wot == 4) return fn(info); + __asm__ __volatile__(""); + if (wot == 5) return fn(info); + __asm__ __volatile__(""); + if (wot == 6) return fn(info); + __asm__ __volatile__(""); + if (wot == 7) return fn(info); + __asm__ __volatile__(""); + if (wot == 8) return fn(info); + __asm__ __volatile__(""); + if (wot == 9) return fn(info); + __asm__ __volatile__(""); + if (wot == 10) return fn(info); + __asm__ __volatile__(""); + if (wot == 11) return fn(info); + __asm__ __volatile__(""); + if (wot == 12) return fn(info); + __asm__ __volatile__(""); + if (wot == 13) return fn(info); + __asm__ __volatile__(""); + if (wot == 14) return fn(info); + __asm__ __volatile__(""); + if (wot == 15) return fn(info); + __asm__ __volatile__(""); + if (wot == 16) return fn(info); + __asm__ __volatile__(""); + if (wot == 17) return fn(info); + __asm__ __volatile__(""); + if (wot == 18) return fn(info); + __asm__ __volatile__(""); + if (wot == 19) return fn(info); + __asm__ __volatile__(""); + if (wot == 20) return fn(info); + __asm__ __volatile__(""); + if (wot == 21) return fn(info); + __asm__ __volatile__(""); + if (wot == 22) return fn(info); + __asm__ __volatile__(""); + if (wot == 23) return fn(info); + __asm__ __volatile__(""); + if (wot == 24) return fn(info); + __asm__ __volatile__(""); + if (wot == 25) return fn(info); + __asm__ __volatile__(""); + if (wot == 26) return fn(info); + __asm__ __volatile__(""); + if (wot == 27) return fn(info); + __asm__ __volatile__(""); + if (wot == 28) return fn(info); + __asm__ __volatile__(""); + if (wot == 29) return fn(info); + __asm__ __volatile__(""); + if (wot == 30) return fn(info); + __asm__ __volatile__(""); + if (wot == 31) return fn(info); + __asm__ __volatile__(""); + if (wot == 32) return fn(info); + __asm__ __volatile__(""); + if (wot == 33) return fn(info); + __asm__ __volatile__(""); + if (wot == 34) return fn(info); + __asm__ __volatile__(""); + if (wot == 35) return fn(info); + __asm__ __volatile__(""); + if (wot == 36) return fn(info); + __asm__ __volatile__(""); + if (wot == 37) return fn(info); + __asm__ __volatile__(""); + if (wot == 38) return fn(info); + __asm__ __volatile__(""); + if (wot == 39) return fn(info); + __asm__ __volatile__(""); + if (wot == 40) return fn(info); + __asm__ __volatile__(""); + if (wot == 41) return fn(info); + __asm__ __volatile__(""); + if (wot == 42) return fn(info); + __asm__ __volatile__(""); + if (wot == 43) return fn(info); + __asm__ __volatile__(""); + if (wot == 44) return fn(info); + __asm__ __volatile__(""); + if (wot == 45) return fn(info); + __asm__ __volatile__(""); + if (wot == 46) return fn(info); + __asm__ __volatile__(""); + if (wot == 47) return fn(info); + __asm__ __volatile__(""); + if (wot == 48) return fn(info); + __asm__ __volatile__(""); + if (wot == 49) return fn(info); + __asm__ __volatile__(""); + if (wot == 50) return fn(info); + __asm__ __volatile__(""); + if (wot == 51) return fn(info); + __asm__ __volatile__(""); + if (wot == 52) return fn(info); + __asm__ __volatile__(""); + if (wot == 53) return fn(info); + __asm__ __volatile__(""); + if (wot == 54) return fn(info); + __asm__ __volatile__(""); + if (wot == 55) return fn(info); + __asm__ __volatile__(""); + if (wot == 56) return fn(info); + __asm__ __volatile__(""); + if (wot == 57) return fn(info); + __asm__ __volatile__(""); + if (wot == 58) return fn(info); + __asm__ __volatile__(""); + if (wot == 59) return fn(info); + __asm__ __volatile__(""); + if (wot == 60) return fn(info); + __asm__ __volatile__(""); + if (wot == 61) return fn(info); + __asm__ __volatile__(""); + if (wot == 62) return fn(info); + __asm__ __volatile__(""); + if (wot == 63) return fn(info); + __asm__ __volatile__(""); + if (wot == 64) return fn(info); + __asm__ __volatile__(""); + if (wot == 65) return fn(info); + __asm__ __volatile__(""); + if (wot == 66) return fn(info); + __asm__ __volatile__(""); + if (wot == 67) return fn(info); + __asm__ __volatile__(""); + if (wot == 68) return fn(info); + __asm__ __volatile__(""); + if (wot == 69) return fn(info); + __asm__ __volatile__(""); + if (wot == 70) return fn(info); + __asm__ __volatile__(""); + if (wot == 71) return fn(info); + __asm__ __volatile__(""); + if (wot == 72) return fn(info); + __asm__ __volatile__(""); + if (wot == 73) return fn(info); + __asm__ __volatile__(""); + if (wot == 74) return fn(info); + __asm__ __volatile__(""); + if (wot == 75) return fn(info); + __asm__ __volatile__(""); + if (wot == 76) return fn(info); + __asm__ __volatile__(""); + if (wot == 77) return fn(info); + __asm__ __volatile__(""); + if (wot == 78) return fn(info); + __asm__ __volatile__(""); + if (wot == 79) return fn(info); + __asm__ __volatile__(""); + if (wot == 80) return fn(info); + __asm__ __volatile__(""); + if (wot == 81) return fn(info); + __asm__ __volatile__(""); + if (wot == 82) return fn(info); + __asm__ __volatile__(""); + if (wot == 83) return fn(info); + __asm__ __volatile__(""); + if (wot == 84) return fn(info); + __asm__ __volatile__(""); + if (wot == 85) return fn(info); + __asm__ __volatile__(""); + if (wot == 86) return fn(info); + __asm__ __volatile__(""); + if (wot == 87) return fn(info); + __asm__ __volatile__(""); + if (wot == 88) return fn(info); + __asm__ __volatile__(""); + if (wot == 89) return fn(info); + __asm__ __volatile__(""); + if (wot == 90) return fn(info); + __asm__ __volatile__(""); + if (wot == 91) return fn(info); + __asm__ __volatile__(""); + if (wot == 92) return fn(info); + __asm__ __volatile__(""); + if (wot == 93) return fn(info); + __asm__ __volatile__(""); + if (wot == 94) return fn(info); + __asm__ __volatile__(""); + if (wot == 95) return fn(info); + __asm__ __volatile__(""); + if (wot == 96) return fn(info); + __asm__ __volatile__(""); + if (wot == 97) return fn(info); + __asm__ __volatile__(""); + if (wot == 98) return fn(info); + __asm__ __volatile__(""); + if (wot == 99) return fn(info); + __asm__ __volatile__(""); + if (wot == 100) return fn(info); + __asm__ __volatile__(""); + if (wot == 101) return fn(info); + __asm__ __volatile__(""); + if (wot == 102) return fn(info); + __asm__ __volatile__(""); + if (wot == 103) return fn(info); + __asm__ __volatile__(""); + if (wot == 104) return fn(info); + __asm__ __volatile__(""); + if (wot == 105) return fn(info); + __asm__ __volatile__(""); + if (wot == 106) return fn(info); + __asm__ __volatile__(""); + if (wot == 107) return fn(info); + __asm__ __volatile__(""); + if (wot == 108) return fn(info); + __asm__ __volatile__(""); + if (wot == 109) return fn(info); + __asm__ __volatile__(""); + if (wot == 110) return fn(info); + __asm__ __volatile__(""); + if (wot == 111) return fn(info); + __asm__ __volatile__(""); + if (wot == 112) return fn(info); + __asm__ __volatile__(""); + if (wot == 113) return fn(info); + __asm__ __volatile__(""); + if (wot == 114) return fn(info); + __asm__ __volatile__(""); + if (wot == 115) return fn(info); + __asm__ __volatile__(""); + if (wot == 116) return fn(info); + __asm__ __volatile__(""); + if (wot == 117) return fn(info); + __asm__ __volatile__(""); + if (wot == 118) return fn(info); + __asm__ __volatile__(""); + if (wot == 119) return fn(info); + __asm__ __volatile__(""); + if (wot == 120) return fn(info); + __asm__ __volatile__(""); + if (wot == 121) return fn(info); + __asm__ __volatile__(""); + if (wot == 122) return fn(info); + __asm__ __volatile__(""); + if (wot == 123) return fn(info); + __asm__ __volatile__(""); + if (wot == 124) return fn(info); + __asm__ __volatile__(""); + if (wot == 125) return fn(info); + __asm__ __volatile__(""); + if (wot == 126) return fn(info); + __asm__ __volatile__(""); + if (wot == 127) return fn(info); + __asm__ __volatile__(""); + if (wot == 128) return fn(info); + __asm__ __volatile__(""); + if (wot == 129) return fn(info); + __asm__ __volatile__(""); + if (wot == 130) return fn(info); + __asm__ __volatile__(""); + if (wot == 131) return fn(info); + __asm__ __volatile__(""); + if (wot == 132) return fn(info); + __asm__ __volatile__(""); + if (wot == 133) return fn(info); + __asm__ __volatile__(""); + if (wot == 134) return fn(info); + __asm__ __volatile__(""); + if (wot == 135) return fn(info); + __asm__ __volatile__(""); + if (wot == 136) return fn(info); + __asm__ __volatile__(""); + if (wot == 137) return fn(info); + __asm__ __volatile__(""); + if (wot == 138) return fn(info); + __asm__ __volatile__(""); + if (wot == 139) return fn(info); + __asm__ __volatile__(""); + if (wot == 140) return fn(info); + __asm__ __volatile__(""); + if (wot == 141) return fn(info); + __asm__ __volatile__(""); + if (wot == 142) return fn(info); + __asm__ __volatile__(""); + if (wot == 143) return fn(info); + __asm__ __volatile__(""); + if (wot == 144) return fn(info); + __asm__ __volatile__(""); + if (wot == 145) return fn(info); + __asm__ __volatile__(""); + if (wot == 146) return fn(info); + __asm__ __volatile__(""); + if (wot == 147) return fn(info); + __asm__ __volatile__(""); + if (wot == 148) return fn(info); + __asm__ __volatile__(""); + if (wot == 149) return fn(info); + __asm__ __volatile__(""); + if (wot == 150) return fn(info); + __asm__ __volatile__(""); + if (wot == 151) return fn(info); + __asm__ __volatile__(""); + if (wot == 152) return fn(info); + __asm__ __volatile__(""); + if (wot == 153) return fn(info); + __asm__ __volatile__(""); + if (wot == 154) return fn(info); + __asm__ __volatile__(""); + if (wot == 155) return fn(info); + __asm__ __volatile__(""); + if (wot == 156) return fn(info); + __asm__ __volatile__(""); + if (wot == 157) return fn(info); + __asm__ __volatile__(""); + if (wot == 158) return fn(info); + __asm__ __volatile__(""); + if (wot == 159) return fn(info); + __asm__ __volatile__(""); + if (wot == 160) return fn(info); + __asm__ __volatile__(""); + if (wot == 161) return fn(info); + __asm__ __volatile__(""); + if (wot == 162) return fn(info); + __asm__ __volatile__(""); + if (wot == 163) return fn(info); + __asm__ __volatile__(""); + if (wot == 164) return fn(info); + __asm__ __volatile__(""); + if (wot == 165) return fn(info); + __asm__ __volatile__(""); + if (wot == 166) return fn(info); + __asm__ __volatile__(""); + if (wot == 167) return fn(info); + __asm__ __volatile__(""); + if (wot == 168) return fn(info); + __asm__ __volatile__(""); + if (wot == 169) return fn(info); + __asm__ __volatile__(""); + if (wot == 170) return fn(info); + __asm__ __volatile__(""); + if (wot == 171) return fn(info); + __asm__ __volatile__(""); + if (wot == 172) return fn(info); + __asm__ __volatile__(""); + if (wot == 173) return fn(info); + __asm__ __volatile__(""); + if (wot == 174) return fn(info); + __asm__ __volatile__(""); + if (wot == 175) return fn(info); + __asm__ __volatile__(""); + if (wot == 176) return fn(info); + __asm__ __volatile__(""); + if (wot == 177) return fn(info); + __asm__ __volatile__(""); + if (wot == 178) return fn(info); + __asm__ __volatile__(""); + if (wot == 179) return fn(info); + __asm__ __volatile__(""); + if (wot == 180) return fn(info); + __asm__ __volatile__(""); + if (wot == 181) return fn(info); + __asm__ __volatile__(""); + if (wot == 182) return fn(info); + __asm__ __volatile__(""); + if (wot == 183) return fn(info); + __asm__ __volatile__(""); + if (wot == 184) return fn(info); + __asm__ __volatile__(""); + if (wot == 185) return fn(info); + __asm__ __volatile__(""); + if (wot == 186) return fn(info); + __asm__ __volatile__(""); + if (wot == 187) return fn(info); + __asm__ __volatile__(""); + if (wot == 188) return fn(info); + __asm__ __volatile__(""); + if (wot == 189) return fn(info); + __asm__ __volatile__(""); + if (wot == 190) return fn(info); + __asm__ __volatile__(""); + if (wot == 191) return fn(info); + __asm__ __volatile__(""); + if (wot == 192) return fn(info); + __asm__ __volatile__(""); + if (wot == 193) return fn(info); + __asm__ __volatile__(""); + if (wot == 194) return fn(info); + __asm__ __volatile__(""); + if (wot == 195) return fn(info); + __asm__ __volatile__(""); + if (wot == 196) return fn(info); + __asm__ __volatile__(""); + if (wot == 197) return fn(info); + __asm__ __volatile__(""); + if (wot == 198) return fn(info); + __asm__ __volatile__(""); + if (wot == 199) return fn(info); + __asm__ __volatile__(""); + if (wot == 200) return fn(info); + __asm__ __volatile__(""); + if (wot == 201) return fn(info); + __asm__ __volatile__(""); + if (wot == 202) return fn(info); + __asm__ __volatile__(""); + if (wot == 203) return fn(info); + __asm__ __volatile__(""); + if (wot == 204) return fn(info); + __asm__ __volatile__(""); + if (wot == 205) return fn(info); + __asm__ __volatile__(""); + if (wot == 206) return fn(info); + __asm__ __volatile__(""); + if (wot == 207) return fn(info); + __asm__ __volatile__(""); + if (wot == 208) return fn(info); + __asm__ __volatile__(""); + if (wot == 209) return fn(info); + __asm__ __volatile__(""); + if (wot == 210) return fn(info); + __asm__ __volatile__(""); + if (wot == 211) return fn(info); + __asm__ __volatile__(""); + if (wot == 212) return fn(info); + __asm__ __volatile__(""); + if (wot == 213) return fn(info); + __asm__ __volatile__(""); + if (wot == 214) return fn(info); + __asm__ __volatile__(""); + if (wot == 215) return fn(info); + __asm__ __volatile__(""); + if (wot == 216) return fn(info); + __asm__ __volatile__(""); + if (wot == 217) return fn(info); + __asm__ __volatile__(""); + if (wot == 218) return fn(info); + __asm__ __volatile__(""); + if (wot == 219) return fn(info); + __asm__ __volatile__(""); + if (wot == 220) return fn(info); + __asm__ __volatile__(""); + if (wot == 221) return fn(info); + __asm__ __volatile__(""); + if (wot == 222) return fn(info); + __asm__ __volatile__(""); + if (wot == 223) return fn(info); + __asm__ __volatile__(""); + if (wot == 224) return fn(info); + __asm__ __volatile__(""); + if (wot == 225) return fn(info); + __asm__ __volatile__(""); + if (wot == 226) return fn(info); + __asm__ __volatile__(""); + if (wot == 227) return fn(info); + __asm__ __volatile__(""); + if (wot == 228) return fn(info); + __asm__ __volatile__(""); + if (wot == 229) return fn(info); + __asm__ __volatile__(""); + if (wot == 230) return fn(info); + __asm__ __volatile__(""); + if (wot == 231) return fn(info); + __asm__ __volatile__(""); + if (wot == 232) return fn(info); + __asm__ __volatile__(""); + if (wot == 233) return fn(info); + __asm__ __volatile__(""); + if (wot == 234) return fn(info); + __asm__ __volatile__(""); + if (wot == 235) return fn(info); + __asm__ __volatile__(""); + if (wot == 236) return fn(info); + __asm__ __volatile__(""); + if (wot == 237) return fn(info); + __asm__ __volatile__(""); + if (wot == 238) return fn(info); + __asm__ __volatile__(""); + if (wot == 239) return fn(info); + __asm__ __volatile__(""); + if (wot == 240) return fn(info); + __asm__ __volatile__(""); + if (wot == 241) return fn(info); + __asm__ __volatile__(""); + if (wot == 242) return fn(info); + __asm__ __volatile__(""); + if (wot == 243) return fn(info); + __asm__ __volatile__(""); + if (wot == 244) return fn(info); + __asm__ __volatile__(""); + if (wot == 245) return fn(info); + __asm__ __volatile__(""); + if (wot == 246) return fn(info); + __asm__ __volatile__(""); + if (wot == 247) return fn(info); + __asm__ __volatile__(""); + if (wot == 248) return fn(info); + __asm__ __volatile__(""); + if (wot == 249) return fn(info); + __asm__ __volatile__(""); + if (wot == 250) return fn(info); + __asm__ __volatile__(""); + if (wot == 251) return fn(info); + __asm__ __volatile__(""); + if (wot == 252) return fn(info); + __asm__ __volatile__(""); + if (wot == 253) return fn(info); + __asm__ __volatile__(""); + if (wot == 254) return fn(info); + __asm__ __volatile__(""); + if (wot == 255) return fn(info); + __asm__ __volatile__(""); + if (wot == 256) return fn(info); + __asm__ __volatile__(""); + if (wot == 257) return fn(info); + __asm__ __volatile__(""); + if (wot == 258) return fn(info); + __asm__ __volatile__(""); + if (wot == 259) return fn(info); + __asm__ __volatile__(""); + if (wot == 260) return fn(info); + __asm__ __volatile__(""); + if (wot == 261) return fn(info); + __asm__ __volatile__(""); + if (wot == 262) return fn(info); + __asm__ __volatile__(""); + if (wot == 263) return fn(info); + __asm__ __volatile__(""); + if (wot == 264) return fn(info); + __asm__ __volatile__(""); + if (wot == 265) return fn(info); + __asm__ __volatile__(""); + if (wot == 266) return fn(info); + __asm__ __volatile__(""); + if (wot == 267) return fn(info); + __asm__ __volatile__(""); + if (wot == 268) return fn(info); + __asm__ __volatile__(""); + if (wot == 269) return fn(info); + __asm__ __volatile__(""); + if (wot == 270) return fn(info); + __asm__ __volatile__(""); + if (wot == 271) return fn(info); + __asm__ __volatile__(""); + if (wot == 272) return fn(info); + __asm__ __volatile__(""); + if (wot == 273) return fn(info); + __asm__ __volatile__(""); + if (wot == 274) return fn(info); + __asm__ __volatile__(""); + if (wot == 275) return fn(info); + __asm__ __volatile__(""); + if (wot == 276) return fn(info); + __asm__ __volatile__(""); + if (wot == 277) return fn(info); + __asm__ __volatile__(""); + if (wot == 278) return fn(info); + __asm__ __volatile__(""); + if (wot == 279) return fn(info); + __asm__ __volatile__(""); + if (wot == 280) return fn(info); + __asm__ __volatile__(""); + if (wot == 281) return fn(info); + __asm__ __volatile__(""); + if (wot == 282) return fn(info); + __asm__ __volatile__(""); + if (wot == 283) return fn(info); + __asm__ __volatile__(""); + if (wot == 284) return fn(info); + __asm__ __volatile__(""); + if (wot == 285) return fn(info); + __asm__ __volatile__(""); + if (wot == 286) return fn(info); + __asm__ __volatile__(""); + if (wot == 287) return fn(info); + __asm__ __volatile__(""); + if (wot == 288) return fn(info); + __asm__ __volatile__(""); + if (wot == 289) return fn(info); + __asm__ __volatile__(""); + if (wot == 290) return fn(info); + __asm__ __volatile__(""); + if (wot == 291) return fn(info); + __asm__ __volatile__(""); + if (wot == 292) return fn(info); + __asm__ __volatile__(""); + if (wot == 293) return fn(info); + __asm__ __volatile__(""); + if (wot == 294) return fn(info); + __asm__ __volatile__(""); + if (wot == 295) return fn(info); + __asm__ __volatile__(""); + if (wot == 296) return fn(info); + __asm__ __volatile__(""); + if (wot == 297) return fn(info); + __asm__ __volatile__(""); + if (wot == 298) return fn(info); + __asm__ __volatile__(""); + if (wot == 299) return fn(info); + __asm__ __volatile__(""); + if (wot == 300) return fn(info); + __asm__ __volatile__(""); + if (wot == 301) return fn(info); + __asm__ __volatile__(""); + if (wot == 302) return fn(info); + __asm__ __volatile__(""); + if (wot == 303) return fn(info); + __asm__ __volatile__(""); + if (wot == 304) return fn(info); + __asm__ __volatile__(""); + if (wot == 305) return fn(info); + __asm__ __volatile__(""); + if (wot == 306) return fn(info); + __asm__ __volatile__(""); + if (wot == 307) return fn(info); + __asm__ __volatile__(""); + if (wot == 308) return fn(info); + __asm__ __volatile__(""); + if (wot == 309) return fn(info); + __asm__ __volatile__(""); + if (wot == 310) return fn(info); + __asm__ __volatile__(""); + if (wot == 311) return fn(info); + __asm__ __volatile__(""); + if (wot == 312) return fn(info); + __asm__ __volatile__(""); + if (wot == 313) return fn(info); + __asm__ __volatile__(""); + if (wot == 314) return fn(info); + __asm__ __volatile__(""); + if (wot == 315) return fn(info); + __asm__ __volatile__(""); + if (wot == 316) return fn(info); + __asm__ __volatile__(""); + if (wot == 317) return fn(info); + __asm__ __volatile__(""); + if (wot == 318) return fn(info); + __asm__ __volatile__(""); + if (wot == 319) return fn(info); + __asm__ __volatile__(""); + if (wot == 320) return fn(info); + __asm__ __volatile__(""); + if (wot == 321) return fn(info); + __asm__ __volatile__(""); + if (wot == 322) return fn(info); + __asm__ __volatile__(""); + if (wot == 323) return fn(info); + __asm__ __volatile__(""); + if (wot == 324) return fn(info); + __asm__ __volatile__(""); + if (wot == 325) return fn(info); + __asm__ __volatile__(""); + if (wot == 326) return fn(info); + __asm__ __volatile__(""); + if (wot == 327) return fn(info); + __asm__ __volatile__(""); + if (wot == 328) return fn(info); + __asm__ __volatile__(""); + if (wot == 329) return fn(info); + __asm__ __volatile__(""); + if (wot == 330) return fn(info); + __asm__ __volatile__(""); + if (wot == 331) return fn(info); + __asm__ __volatile__(""); + if (wot == 332) return fn(info); + __asm__ __volatile__(""); + if (wot == 333) return fn(info); + __asm__ __volatile__(""); + if (wot == 334) return fn(info); + __asm__ __volatile__(""); + if (wot == 335) return fn(info); + __asm__ __volatile__(""); + if (wot == 336) return fn(info); + __asm__ __volatile__(""); + if (wot == 337) return fn(info); + __asm__ __volatile__(""); + if (wot == 338) return fn(info); + __asm__ __volatile__(""); + if (wot == 339) return fn(info); + __asm__ __volatile__(""); + if (wot == 340) return fn(info); + __asm__ __volatile__(""); + if (wot == 341) return fn(info); + __asm__ __volatile__(""); + if (wot == 342) return fn(info); + __asm__ __volatile__(""); + if (wot == 343) return fn(info); + __asm__ __volatile__(""); + if (wot == 344) return fn(info); + __asm__ __volatile__(""); + if (wot == 345) return fn(info); + __asm__ __volatile__(""); + if (wot == 346) return fn(info); + __asm__ __volatile__(""); + if (wot == 347) return fn(info); + __asm__ __volatile__(""); + if (wot == 348) return fn(info); + __asm__ __volatile__(""); + if (wot == 349) return fn(info); + __asm__ __volatile__(""); + if (wot == 350) return fn(info); + __asm__ __volatile__(""); + if (wot == 351) return fn(info); + __asm__ __volatile__(""); + if (wot == 352) return fn(info); + __asm__ __volatile__(""); + if (wot == 353) return fn(info); + __asm__ __volatile__(""); + if (wot == 354) return fn(info); + __asm__ __volatile__(""); + if (wot == 355) return fn(info); + __asm__ __volatile__(""); + if (wot == 356) return fn(info); + __asm__ __volatile__(""); + if (wot == 357) return fn(info); + __asm__ __volatile__(""); + if (wot == 358) return fn(info); + __asm__ __volatile__(""); + if (wot == 359) return fn(info); + __asm__ __volatile__(""); + if (wot == 360) return fn(info); + __asm__ __volatile__(""); + if (wot == 361) return fn(info); + __asm__ __volatile__(""); + if (wot == 362) return fn(info); + __asm__ __volatile__(""); + if (wot == 363) return fn(info); + __asm__ __volatile__(""); + if (wot == 364) return fn(info); + __asm__ __volatile__(""); + if (wot == 365) return fn(info); + __asm__ __volatile__(""); + if (wot == 366) return fn(info); + __asm__ __volatile__(""); + if (wot == 367) return fn(info); + __asm__ __volatile__(""); + if (wot == 368) return fn(info); + __asm__ __volatile__(""); + if (wot == 369) return fn(info); + __asm__ __volatile__(""); + if (wot == 370) return fn(info); + __asm__ __volatile__(""); + if (wot == 371) return fn(info); + __asm__ __volatile__(""); + if (wot == 372) return fn(info); + __asm__ __volatile__(""); + if (wot == 373) return fn(info); + __asm__ __volatile__(""); + if (wot == 374) return fn(info); + __asm__ __volatile__(""); + if (wot == 375) return fn(info); + __asm__ __volatile__(""); + if (wot == 376) return fn(info); + __asm__ __volatile__(""); + if (wot == 377) return fn(info); + __asm__ __volatile__(""); + if (wot == 378) return fn(info); + __asm__ __volatile__(""); + if (wot == 379) return fn(info); + __asm__ __volatile__(""); + if (wot == 380) return fn(info); + __asm__ __volatile__(""); + if (wot == 381) return fn(info); + __asm__ __volatile__(""); + if (wot == 382) return fn(info); + __asm__ __volatile__(""); + if (wot == 383) return fn(info); + __asm__ __volatile__(""); + if (wot == 384) return fn(info); + __asm__ __volatile__(""); + if (wot == 385) return fn(info); + __asm__ __volatile__(""); + if (wot == 386) return fn(info); + __asm__ __volatile__(""); + if (wot == 387) return fn(info); + __asm__ __volatile__(""); + if (wot == 388) return fn(info); + __asm__ __volatile__(""); + if (wot == 389) return fn(info); + __asm__ __volatile__(""); + if (wot == 390) return fn(info); + __asm__ __volatile__(""); + if (wot == 391) return fn(info); + __asm__ __volatile__(""); + if (wot == 392) return fn(info); + __asm__ __volatile__(""); + if (wot == 393) return fn(info); + __asm__ __volatile__(""); + if (wot == 394) return fn(info); + __asm__ __volatile__(""); + if (wot == 395) return fn(info); + __asm__ __volatile__(""); + if (wot == 396) return fn(info); + __asm__ __volatile__(""); + if (wot == 397) return fn(info); + __asm__ __volatile__(""); + if (wot == 398) return fn(info); + __asm__ __volatile__(""); + if (wot == 399) return fn(info); + __asm__ __volatile__(""); + if (wot == 400) return fn(info); + __asm__ __volatile__(""); + if (wot == 401) return fn(info); + __asm__ __volatile__(""); + if (wot == 402) return fn(info); + __asm__ __volatile__(""); + if (wot == 403) return fn(info); + __asm__ __volatile__(""); + if (wot == 404) return fn(info); + __asm__ __volatile__(""); + if (wot == 405) return fn(info); + __asm__ __volatile__(""); + if (wot == 406) return fn(info); + __asm__ __volatile__(""); + if (wot == 407) return fn(info); + __asm__ __volatile__(""); + if (wot == 408) return fn(info); + __asm__ __volatile__(""); + if (wot == 409) return fn(info); + __asm__ __volatile__(""); + if (wot == 410) return fn(info); + __asm__ __volatile__(""); + if (wot == 411) return fn(info); + __asm__ __volatile__(""); + if (wot == 412) return fn(info); + __asm__ __volatile__(""); + if (wot == 413) return fn(info); + __asm__ __volatile__(""); + if (wot == 414) return fn(info); + __asm__ __volatile__(""); + if (wot == 415) return fn(info); + __asm__ __volatile__(""); + if (wot == 416) return fn(info); + __asm__ __volatile__(""); + if (wot == 417) return fn(info); + __asm__ __volatile__(""); + if (wot == 418) return fn(info); + __asm__ __volatile__(""); + if (wot == 419) return fn(info); + __asm__ __volatile__(""); + if (wot == 420) return fn(info); + __asm__ __volatile__(""); + if (wot == 421) return fn(info); + __asm__ __volatile__(""); + if (wot == 422) return fn(info); + __asm__ __volatile__(""); + if (wot == 423) return fn(info); + __asm__ __volatile__(""); + if (wot == 424) return fn(info); + __asm__ __volatile__(""); + if (wot == 425) return fn(info); + __asm__ __volatile__(""); + if (wot == 426) return fn(info); + __asm__ __volatile__(""); + if (wot == 427) return fn(info); + __asm__ __volatile__(""); + if (wot == 428) return fn(info); + __asm__ __volatile__(""); + if (wot == 429) return fn(info); + __asm__ __volatile__(""); + if (wot == 430) return fn(info); + __asm__ __volatile__(""); + if (wot == 431) return fn(info); + __asm__ __volatile__(""); + if (wot == 432) return fn(info); + __asm__ __volatile__(""); + if (wot == 433) return fn(info); + __asm__ __volatile__(""); + if (wot == 434) return fn(info); + __asm__ __volatile__(""); + if (wot == 435) return fn(info); + __asm__ __volatile__(""); + if (wot == 436) return fn(info); + __asm__ __volatile__(""); + if (wot == 437) return fn(info); + __asm__ __volatile__(""); + if (wot == 438) return fn(info); + __asm__ __volatile__(""); + if (wot == 439) return fn(info); + __asm__ __volatile__(""); + if (wot == 440) return fn(info); + __asm__ __volatile__(""); + if (wot == 441) return fn(info); + __asm__ __volatile__(""); + if (wot == 442) return fn(info); + __asm__ __volatile__(""); + if (wot == 443) return fn(info); + __asm__ __volatile__(""); + if (wot == 444) return fn(info); + __asm__ __volatile__(""); + if (wot == 445) return fn(info); + __asm__ __volatile__(""); + if (wot == 446) return fn(info); + __asm__ __volatile__(""); + if (wot == 447) return fn(info); + __asm__ __volatile__(""); + if (wot == 448) return fn(info); + __asm__ __volatile__(""); + if (wot == 449) return fn(info); + __asm__ __volatile__(""); + if (wot == 450) return fn(info); + __asm__ __volatile__(""); + if (wot == 451) return fn(info); + __asm__ __volatile__(""); + if (wot == 452) return fn(info); + __asm__ __volatile__(""); + if (wot == 453) return fn(info); + __asm__ __volatile__(""); + if (wot == 454) return fn(info); + __asm__ __volatile__(""); + if (wot == 455) return fn(info); + __asm__ __volatile__(""); + if (wot == 456) return fn(info); + __asm__ __volatile__(""); + if (wot == 457) return fn(info); + __asm__ __volatile__(""); + if (wot == 458) return fn(info); + __asm__ __volatile__(""); + if (wot == 459) return fn(info); + __asm__ __volatile__(""); + if (wot == 460) return fn(info); + __asm__ __volatile__(""); + if (wot == 461) return fn(info); + __asm__ __volatile__(""); + if (wot == 462) return fn(info); + __asm__ __volatile__(""); + if (wot == 463) return fn(info); + __asm__ __volatile__(""); + if (wot == 464) return fn(info); + __asm__ __volatile__(""); + if (wot == 465) return fn(info); + __asm__ __volatile__(""); + if (wot == 466) return fn(info); + __asm__ __volatile__(""); + if (wot == 467) return fn(info); + __asm__ __volatile__(""); + if (wot == 468) return fn(info); + __asm__ __volatile__(""); + if (wot == 469) return fn(info); + __asm__ __volatile__(""); + if (wot == 470) return fn(info); + __asm__ __volatile__(""); + if (wot == 471) return fn(info); + __asm__ __volatile__(""); + if (wot == 472) return fn(info); + __asm__ __volatile__(""); + if (wot == 473) return fn(info); + __asm__ __volatile__(""); + if (wot == 474) return fn(info); + __asm__ __volatile__(""); + if (wot == 475) return fn(info); + __asm__ __volatile__(""); + if (wot == 476) return fn(info); + __asm__ __volatile__(""); + if (wot == 477) return fn(info); + __asm__ __volatile__(""); + if (wot == 478) return fn(info); + __asm__ __volatile__(""); + if (wot == 479) return fn(info); + __asm__ __volatile__(""); + if (wot == 480) return fn(info); + __asm__ __volatile__(""); + if (wot == 481) return fn(info); + __asm__ __volatile__(""); + if (wot == 482) return fn(info); + __asm__ __volatile__(""); + if (wot == 483) return fn(info); + __asm__ __volatile__(""); + if (wot == 484) return fn(info); + __asm__ __volatile__(""); + if (wot == 485) return fn(info); + __asm__ __volatile__(""); + if (wot == 486) return fn(info); + __asm__ __volatile__(""); + if (wot == 487) return fn(info); + __asm__ __volatile__(""); + if (wot == 488) return fn(info); + __asm__ __volatile__(""); + if (wot == 489) return fn(info); + __asm__ __volatile__(""); + if (wot == 490) return fn(info); + __asm__ __volatile__(""); + if (wot == 491) return fn(info); + __asm__ __volatile__(""); + if (wot == 492) return fn(info); + __asm__ __volatile__(""); + if (wot == 493) return fn(info); + __asm__ __volatile__(""); + if (wot == 494) return fn(info); + __asm__ __volatile__(""); + if (wot == 495) return fn(info); + __asm__ __volatile__(""); + if (wot == 496) return fn(info); + __asm__ __volatile__(""); + if (wot == 497) return fn(info); + __asm__ __volatile__(""); + if (wot == 498) return fn(info); + __asm__ __volatile__(""); + if (wot == 499) return fn(info); + __asm__ __volatile__(""); + halfway: + if (wot == 500) return fn(info); + __asm__ __volatile__(""); + if (wot == 501) return fn(info); + __asm__ __volatile__(""); + if (wot == 502) return fn(info); + __asm__ __volatile__(""); + if (wot == 503) return fn(info); + __asm__ __volatile__(""); + if (wot == 504) return fn(info); + __asm__ __volatile__(""); + if (wot == 505) return fn(info); + __asm__ __volatile__(""); + if (wot == 506) return fn(info); + __asm__ __volatile__(""); + if (wot == 507) return fn(info); + __asm__ __volatile__(""); + if (wot == 508) return fn(info); + __asm__ __volatile__(""); + if (wot == 509) return fn(info); + __asm__ __volatile__(""); + if (wot == 510) return fn(info); + __asm__ __volatile__(""); + if (wot == 511) return fn(info); + __asm__ __volatile__(""); + if (wot == 512) return fn(info); + __asm__ __volatile__(""); + if (wot == 513) return fn(info); + __asm__ __volatile__(""); + if (wot == 514) return fn(info); + __asm__ __volatile__(""); + if (wot == 515) return fn(info); + __asm__ __volatile__(""); + if (wot == 516) return fn(info); + __asm__ __volatile__(""); + if (wot == 517) return fn(info); + __asm__ __volatile__(""); + if (wot == 518) return fn(info); + __asm__ __volatile__(""); + if (wot == 519) return fn(info); + __asm__ __volatile__(""); + if (wot == 520) return fn(info); + __asm__ __volatile__(""); + if (wot == 521) return fn(info); + __asm__ __volatile__(""); + if (wot == 522) return fn(info); + __asm__ __volatile__(""); + if (wot == 523) return fn(info); + __asm__ __volatile__(""); + if (wot == 524) return fn(info); + __asm__ __volatile__(""); + if (wot == 525) return fn(info); + __asm__ __volatile__(""); + if (wot == 526) return fn(info); + __asm__ __volatile__(""); + if (wot == 527) return fn(info); + __asm__ __volatile__(""); + if (wot == 528) return fn(info); + __asm__ __volatile__(""); + if (wot == 529) return fn(info); + __asm__ __volatile__(""); + if (wot == 530) return fn(info); + __asm__ __volatile__(""); + if (wot == 531) return fn(info); + __asm__ __volatile__(""); + if (wot == 532) return fn(info); + __asm__ __volatile__(""); + if (wot == 533) return fn(info); + __asm__ __volatile__(""); + if (wot == 534) return fn(info); + __asm__ __volatile__(""); + if (wot == 535) return fn(info); + __asm__ __volatile__(""); + if (wot == 536) return fn(info); + __asm__ __volatile__(""); + if (wot == 537) return fn(info); + __asm__ __volatile__(""); + if (wot == 538) return fn(info); + __asm__ __volatile__(""); + if (wot == 539) return fn(info); + __asm__ __volatile__(""); + if (wot == 540) return fn(info); + __asm__ __volatile__(""); + if (wot == 541) return fn(info); + __asm__ __volatile__(""); + if (wot == 542) return fn(info); + __asm__ __volatile__(""); + if (wot == 543) return fn(info); + __asm__ __volatile__(""); + if (wot == 544) return fn(info); + __asm__ __volatile__(""); + if (wot == 545) return fn(info); + __asm__ __volatile__(""); + if (wot == 546) return fn(info); + __asm__ __volatile__(""); + if (wot == 547) return fn(info); + __asm__ __volatile__(""); + if (wot == 548) return fn(info); + __asm__ __volatile__(""); + if (wot == 549) return fn(info); + __asm__ __volatile__(""); + if (wot == 550) return fn(info); + __asm__ __volatile__(""); + if (wot == 551) return fn(info); + __asm__ __volatile__(""); + if (wot == 552) return fn(info); + __asm__ __volatile__(""); + if (wot == 553) return fn(info); + __asm__ __volatile__(""); + if (wot == 554) return fn(info); + __asm__ __volatile__(""); + if (wot == 555) return fn(info); + __asm__ __volatile__(""); + if (wot == 556) return fn(info); + __asm__ __volatile__(""); + if (wot == 557) return fn(info); + __asm__ __volatile__(""); + if (wot == 558) return fn(info); + __asm__ __volatile__(""); + if (wot == 559) return fn(info); + __asm__ __volatile__(""); + if (wot == 560) return fn(info); + __asm__ __volatile__(""); + if (wot == 561) return fn(info); + __asm__ __volatile__(""); + if (wot == 562) return fn(info); + __asm__ __volatile__(""); + if (wot == 563) return fn(info); + __asm__ __volatile__(""); + if (wot == 564) return fn(info); + __asm__ __volatile__(""); + if (wot == 565) return fn(info); + __asm__ __volatile__(""); + if (wot == 566) return fn(info); + __asm__ __volatile__(""); + if (wot == 567) return fn(info); + __asm__ __volatile__(""); + if (wot == 568) return fn(info); + __asm__ __volatile__(""); + if (wot == 569) return fn(info); + __asm__ __volatile__(""); + if (wot == 570) return fn(info); + __asm__ __volatile__(""); + if (wot == 571) return fn(info); + __asm__ __volatile__(""); + if (wot == 572) return fn(info); + __asm__ __volatile__(""); + if (wot == 573) return fn(info); + __asm__ __volatile__(""); + if (wot == 574) return fn(info); + __asm__ __volatile__(""); + if (wot == 575) return fn(info); + __asm__ __volatile__(""); + if (wot == 576) return fn(info); + __asm__ __volatile__(""); + if (wot == 577) return fn(info); + __asm__ __volatile__(""); + if (wot == 578) return fn(info); + __asm__ __volatile__(""); + if (wot == 579) return fn(info); + __asm__ __volatile__(""); + if (wot == 580) return fn(info); + __asm__ __volatile__(""); + if (wot == 581) return fn(info); + __asm__ __volatile__(""); + if (wot == 582) return fn(info); + __asm__ __volatile__(""); + if (wot == 583) return fn(info); + __asm__ __volatile__(""); + if (wot == 584) return fn(info); + __asm__ __volatile__(""); + if (wot == 585) return fn(info); + __asm__ __volatile__(""); + if (wot == 586) return fn(info); + __asm__ __volatile__(""); + if (wot == 587) return fn(info); + __asm__ __volatile__(""); + if (wot == 588) return fn(info); + __asm__ __volatile__(""); + if (wot == 589) return fn(info); + __asm__ __volatile__(""); + if (wot == 590) return fn(info); + __asm__ __volatile__(""); + if (wot == 591) return fn(info); + __asm__ __volatile__(""); + if (wot == 592) return fn(info); + __asm__ __volatile__(""); + if (wot == 593) return fn(info); + __asm__ __volatile__(""); + if (wot == 594) return fn(info); + __asm__ __volatile__(""); + if (wot == 595) return fn(info); + __asm__ __volatile__(""); + if (wot == 596) return fn(info); + __asm__ __volatile__(""); + if (wot == 597) return fn(info); + __asm__ __volatile__(""); + if (wot == 598) return fn(info); + __asm__ __volatile__(""); + if (wot == 599) return fn(info); + __asm__ __volatile__(""); + if (wot == 600) return fn(info); + __asm__ __volatile__(""); + if (wot == 601) return fn(info); + __asm__ __volatile__(""); + if (wot == 602) return fn(info); + __asm__ __volatile__(""); + if (wot == 603) return fn(info); + __asm__ __volatile__(""); + if (wot == 604) return fn(info); + __asm__ __volatile__(""); + if (wot == 605) return fn(info); + __asm__ __volatile__(""); + if (wot == 606) return fn(info); + __asm__ __volatile__(""); + if (wot == 607) return fn(info); + __asm__ __volatile__(""); + if (wot == 608) return fn(info); + __asm__ __volatile__(""); + if (wot == 609) return fn(info); + __asm__ __volatile__(""); + if (wot == 610) return fn(info); + __asm__ __volatile__(""); + if (wot == 611) return fn(info); + __asm__ __volatile__(""); + if (wot == 612) return fn(info); + __asm__ __volatile__(""); + if (wot == 613) return fn(info); + __asm__ __volatile__(""); + if (wot == 614) return fn(info); + __asm__ __volatile__(""); + if (wot == 615) return fn(info); + __asm__ __volatile__(""); + if (wot == 616) return fn(info); + __asm__ __volatile__(""); + if (wot == 617) return fn(info); + __asm__ __volatile__(""); + if (wot == 618) return fn(info); + __asm__ __volatile__(""); + if (wot == 619) return fn(info); + __asm__ __volatile__(""); + if (wot == 620) return fn(info); + __asm__ __volatile__(""); + if (wot == 621) return fn(info); + __asm__ __volatile__(""); + if (wot == 622) return fn(info); + __asm__ __volatile__(""); + if (wot == 623) return fn(info); + __asm__ __volatile__(""); + if (wot == 624) return fn(info); + __asm__ __volatile__(""); + if (wot == 625) return fn(info); + __asm__ __volatile__(""); + if (wot == 626) return fn(info); + __asm__ __volatile__(""); + if (wot == 627) return fn(info); + __asm__ __volatile__(""); + if (wot == 628) return fn(info); + __asm__ __volatile__(""); + if (wot == 629) return fn(info); + __asm__ __volatile__(""); + if (wot == 630) return fn(info); + __asm__ __volatile__(""); + if (wot == 631) return fn(info); + __asm__ __volatile__(""); + if (wot == 632) return fn(info); + __asm__ __volatile__(""); + if (wot == 633) return fn(info); + __asm__ __volatile__(""); + if (wot == 634) return fn(info); + __asm__ __volatile__(""); + if (wot == 635) return fn(info); + __asm__ __volatile__(""); + if (wot == 636) return fn(info); + __asm__ __volatile__(""); + if (wot == 637) return fn(info); + __asm__ __volatile__(""); + if (wot == 638) return fn(info); + __asm__ __volatile__(""); + if (wot == 639) return fn(info); + __asm__ __volatile__(""); + if (wot == 640) return fn(info); + __asm__ __volatile__(""); + if (wot == 641) return fn(info); + __asm__ __volatile__(""); + if (wot == 642) return fn(info); + __asm__ __volatile__(""); + if (wot == 643) return fn(info); + __asm__ __volatile__(""); + if (wot == 644) return fn(info); + __asm__ __volatile__(""); + if (wot == 645) return fn(info); + __asm__ __volatile__(""); + if (wot == 646) return fn(info); + __asm__ __volatile__(""); + if (wot == 647) return fn(info); + __asm__ __volatile__(""); + if (wot == 648) return fn(info); + __asm__ __volatile__(""); + if (wot == 649) return fn(info); + __asm__ __volatile__(""); + if (wot == 650) return fn(info); + __asm__ __volatile__(""); + if (wot == 651) return fn(info); + __asm__ __volatile__(""); + if (wot == 652) return fn(info); + __asm__ __volatile__(""); + if (wot == 653) return fn(info); + __asm__ __volatile__(""); + if (wot == 654) return fn(info); + __asm__ __volatile__(""); + if (wot == 655) return fn(info); + __asm__ __volatile__(""); + if (wot == 656) return fn(info); + __asm__ __volatile__(""); + if (wot == 657) return fn(info); + __asm__ __volatile__(""); + if (wot == 658) return fn(info); + __asm__ __volatile__(""); + if (wot == 659) return fn(info); + __asm__ __volatile__(""); + if (wot == 660) return fn(info); + __asm__ __volatile__(""); + if (wot == 661) return fn(info); + __asm__ __volatile__(""); + if (wot == 662) return fn(info); + __asm__ __volatile__(""); + if (wot == 663) return fn(info); + __asm__ __volatile__(""); + if (wot == 664) return fn(info); + __asm__ __volatile__(""); + if (wot == 665) return fn(info); + __asm__ __volatile__(""); + if (wot == 666) return fn(info); + __asm__ __volatile__(""); + if (wot == 667) return fn(info); + __asm__ __volatile__(""); + if (wot == 668) return fn(info); + __asm__ __volatile__(""); + if (wot == 669) return fn(info); + __asm__ __volatile__(""); + if (wot == 670) return fn(info); + __asm__ __volatile__(""); + if (wot == 671) return fn(info); + __asm__ __volatile__(""); + if (wot == 672) return fn(info); + __asm__ __volatile__(""); + if (wot == 673) return fn(info); + __asm__ __volatile__(""); + if (wot == 674) return fn(info); + __asm__ __volatile__(""); + if (wot == 675) return fn(info); + __asm__ __volatile__(""); + if (wot == 676) return fn(info); + __asm__ __volatile__(""); + if (wot == 677) return fn(info); + __asm__ __volatile__(""); + if (wot == 678) return fn(info); + __asm__ __volatile__(""); + if (wot == 679) return fn(info); + __asm__ __volatile__(""); + if (wot == 680) return fn(info); + __asm__ __volatile__(""); + if (wot == 681) return fn(info); + __asm__ __volatile__(""); + if (wot == 682) return fn(info); + __asm__ __volatile__(""); + if (wot == 683) return fn(info); + __asm__ __volatile__(""); + if (wot == 684) return fn(info); + __asm__ __volatile__(""); + if (wot == 685) return fn(info); + __asm__ __volatile__(""); + if (wot == 686) return fn(info); + __asm__ __volatile__(""); + if (wot == 687) return fn(info); + __asm__ __volatile__(""); + if (wot == 688) return fn(info); + __asm__ __volatile__(""); + if (wot == 689) return fn(info); + __asm__ __volatile__(""); + if (wot == 690) return fn(info); + __asm__ __volatile__(""); + if (wot == 691) return fn(info); + __asm__ __volatile__(""); + if (wot == 692) return fn(info); + __asm__ __volatile__(""); + if (wot == 693) return fn(info); + __asm__ __volatile__(""); + if (wot == 694) return fn(info); + __asm__ __volatile__(""); + if (wot == 695) return fn(info); + __asm__ __volatile__(""); + if (wot == 696) return fn(info); + __asm__ __volatile__(""); + if (wot == 697) return fn(info); + __asm__ __volatile__(""); + if (wot == 698) return fn(info); + __asm__ __volatile__(""); + if (wot == 699) return fn(info); + __asm__ __volatile__(""); + if (wot == 700) return fn(info); + __asm__ __volatile__(""); + if (wot == 701) return fn(info); + __asm__ __volatile__(""); + if (wot == 702) return fn(info); + __asm__ __volatile__(""); + if (wot == 703) return fn(info); + __asm__ __volatile__(""); + if (wot == 704) return fn(info); + __asm__ __volatile__(""); + if (wot == 705) return fn(info); + __asm__ __volatile__(""); + if (wot == 706) return fn(info); + __asm__ __volatile__(""); + if (wot == 707) return fn(info); + __asm__ __volatile__(""); + if (wot == 708) return fn(info); + __asm__ __volatile__(""); + if (wot == 709) return fn(info); + __asm__ __volatile__(""); + if (wot == 710) return fn(info); + __asm__ __volatile__(""); + if (wot == 711) return fn(info); + __asm__ __volatile__(""); + if (wot == 712) return fn(info); + __asm__ __volatile__(""); + if (wot == 713) return fn(info); + __asm__ __volatile__(""); + if (wot == 714) return fn(info); + __asm__ __volatile__(""); + if (wot == 715) return fn(info); + __asm__ __volatile__(""); + if (wot == 716) return fn(info); + __asm__ __volatile__(""); + if (wot == 717) return fn(info); + __asm__ __volatile__(""); + if (wot == 718) return fn(info); + __asm__ __volatile__(""); + if (wot == 719) return fn(info); + __asm__ __volatile__(""); + if (wot == 720) return fn(info); + __asm__ __volatile__(""); + if (wot == 721) return fn(info); + __asm__ __volatile__(""); + if (wot == 722) return fn(info); + __asm__ __volatile__(""); + if (wot == 723) return fn(info); + __asm__ __volatile__(""); + if (wot == 724) return fn(info); + __asm__ __volatile__(""); + if (wot == 725) return fn(info); + __asm__ __volatile__(""); + if (wot == 726) return fn(info); + __asm__ __volatile__(""); + if (wot == 727) return fn(info); + __asm__ __volatile__(""); + if (wot == 728) return fn(info); + __asm__ __volatile__(""); + if (wot == 729) return fn(info); + __asm__ __volatile__(""); + if (wot == 730) return fn(info); + __asm__ __volatile__(""); + if (wot == 731) return fn(info); + __asm__ __volatile__(""); + if (wot == 732) return fn(info); + __asm__ __volatile__(""); + if (wot == 733) return fn(info); + __asm__ __volatile__(""); + if (wot == 734) return fn(info); + __asm__ __volatile__(""); + if (wot == 735) return fn(info); + __asm__ __volatile__(""); + if (wot == 736) return fn(info); + __asm__ __volatile__(""); + if (wot == 737) return fn(info); + __asm__ __volatile__(""); + if (wot == 738) return fn(info); + __asm__ __volatile__(""); + if (wot == 739) return fn(info); + __asm__ __volatile__(""); + if (wot == 740) return fn(info); + __asm__ __volatile__(""); + if (wot == 741) return fn(info); + __asm__ __volatile__(""); + if (wot == 742) return fn(info); + __asm__ __volatile__(""); + if (wot == 743) return fn(info); + __asm__ __volatile__(""); + if (wot == 744) return fn(info); + __asm__ __volatile__(""); + if (wot == 745) return fn(info); + __asm__ __volatile__(""); + if (wot == 746) return fn(info); + __asm__ __volatile__(""); + if (wot == 747) return fn(info); + __asm__ __volatile__(""); + if (wot == 748) return fn(info); + __asm__ __volatile__(""); + if (wot == 749) return fn(info); + __asm__ __volatile__(""); + if (wot == 750) return fn(info); + __asm__ __volatile__(""); + if (wot == 751) return fn(info); + __asm__ __volatile__(""); + if (wot == 752) return fn(info); + __asm__ __volatile__(""); + if (wot == 753) return fn(info); + __asm__ __volatile__(""); + if (wot == 754) return fn(info); + __asm__ __volatile__(""); + if (wot == 755) return fn(info); + __asm__ __volatile__(""); + if (wot == 756) return fn(info); + __asm__ __volatile__(""); + if (wot == 757) return fn(info); + __asm__ __volatile__(""); + if (wot == 758) return fn(info); + __asm__ __volatile__(""); + if (wot == 759) return fn(info); + __asm__ __volatile__(""); + if (wot == 760) return fn(info); + __asm__ __volatile__(""); + if (wot == 761) return fn(info); + __asm__ __volatile__(""); + if (wot == 762) return fn(info); + __asm__ __volatile__(""); + if (wot == 763) return fn(info); + __asm__ __volatile__(""); + if (wot == 764) return fn(info); + __asm__ __volatile__(""); + if (wot == 765) return fn(info); + __asm__ __volatile__(""); + if (wot == 766) return fn(info); + __asm__ __volatile__(""); + if (wot == 767) return fn(info); + __asm__ __volatile__(""); + if (wot == 768) return fn(info); + __asm__ __volatile__(""); + if (wot == 769) return fn(info); + __asm__ __volatile__(""); + if (wot == 770) return fn(info); + __asm__ __volatile__(""); + if (wot == 771) return fn(info); + __asm__ __volatile__(""); + if (wot == 772) return fn(info); + __asm__ __volatile__(""); + if (wot == 773) return fn(info); + __asm__ __volatile__(""); + if (wot == 774) return fn(info); + __asm__ __volatile__(""); + if (wot == 775) return fn(info); + __asm__ __volatile__(""); + if (wot == 776) return fn(info); + __asm__ __volatile__(""); + if (wot == 777) return fn(info); + __asm__ __volatile__(""); + if (wot == 778) return fn(info); + __asm__ __volatile__(""); + if (wot == 779) return fn(info); + __asm__ __volatile__(""); + if (wot == 780) return fn(info); + __asm__ __volatile__(""); + if (wot == 781) return fn(info); + __asm__ __volatile__(""); + if (wot == 782) return fn(info); + __asm__ __volatile__(""); + if (wot == 783) return fn(info); + __asm__ __volatile__(""); + if (wot == 784) return fn(info); + __asm__ __volatile__(""); + if (wot == 785) return fn(info); + __asm__ __volatile__(""); + if (wot == 786) return fn(info); + __asm__ __volatile__(""); + if (wot == 787) return fn(info); + __asm__ __volatile__(""); + if (wot == 788) return fn(info); + __asm__ __volatile__(""); + if (wot == 789) return fn(info); + __asm__ __volatile__(""); + if (wot == 790) return fn(info); + __asm__ __volatile__(""); + if (wot == 791) return fn(info); + __asm__ __volatile__(""); + if (wot == 792) return fn(info); + __asm__ __volatile__(""); + if (wot == 793) return fn(info); + __asm__ __volatile__(""); + if (wot == 794) return fn(info); + __asm__ __volatile__(""); + if (wot == 795) return fn(info); + __asm__ __volatile__(""); + if (wot == 796) return fn(info); + __asm__ __volatile__(""); + if (wot == 797) return fn(info); + __asm__ __volatile__(""); + if (wot == 798) return fn(info); + __asm__ __volatile__(""); + if (wot == 799) return fn(info); + __asm__ __volatile__(""); + if (wot == 800) return fn(info); + __asm__ __volatile__(""); + if (wot == 801) return fn(info); + __asm__ __volatile__(""); + if (wot == 802) return fn(info); + __asm__ __volatile__(""); + if (wot == 803) return fn(info); + __asm__ __volatile__(""); + if (wot == 804) return fn(info); + __asm__ __volatile__(""); + if (wot == 805) return fn(info); + __asm__ __volatile__(""); + if (wot == 806) return fn(info); + __asm__ __volatile__(""); + if (wot == 807) return fn(info); + __asm__ __volatile__(""); + if (wot == 808) return fn(info); + __asm__ __volatile__(""); + if (wot == 809) return fn(info); + __asm__ __volatile__(""); + if (wot == 810) return fn(info); + __asm__ __volatile__(""); + if (wot == 811) return fn(info); + __asm__ __volatile__(""); + if (wot == 812) return fn(info); + __asm__ __volatile__(""); + if (wot == 813) return fn(info); + __asm__ __volatile__(""); + if (wot == 814) return fn(info); + __asm__ __volatile__(""); + if (wot == 815) return fn(info); + __asm__ __volatile__(""); + if (wot == 816) return fn(info); + __asm__ __volatile__(""); + if (wot == 817) return fn(info); + __asm__ __volatile__(""); + if (wot == 818) return fn(info); + __asm__ __volatile__(""); + if (wot == 819) return fn(info); + __asm__ __volatile__(""); + if (wot == 820) return fn(info); + __asm__ __volatile__(""); + if (wot == 821) return fn(info); + __asm__ __volatile__(""); + if (wot == 822) return fn(info); + __asm__ __volatile__(""); + if (wot == 823) return fn(info); + __asm__ __volatile__(""); + if (wot == 824) return fn(info); + __asm__ __volatile__(""); + if (wot == 825) return fn(info); + __asm__ __volatile__(""); + if (wot == 826) return fn(info); + __asm__ __volatile__(""); + if (wot == 827) return fn(info); + __asm__ __volatile__(""); + if (wot == 828) return fn(info); + __asm__ __volatile__(""); + if (wot == 829) return fn(info); + __asm__ __volatile__(""); + if (wot == 830) return fn(info); + __asm__ __volatile__(""); + if (wot == 831) return fn(info); + __asm__ __volatile__(""); + if (wot == 832) return fn(info); + __asm__ __volatile__(""); + if (wot == 833) return fn(info); + __asm__ __volatile__(""); + if (wot == 834) return fn(info); + __asm__ __volatile__(""); + if (wot == 835) return fn(info); + __asm__ __volatile__(""); + if (wot == 836) return fn(info); + __asm__ __volatile__(""); + if (wot == 837) return fn(info); + __asm__ __volatile__(""); + if (wot == 838) return fn(info); + __asm__ __volatile__(""); + if (wot == 839) return fn(info); + __asm__ __volatile__(""); + if (wot == 840) return fn(info); + __asm__ __volatile__(""); + if (wot == 841) return fn(info); + __asm__ __volatile__(""); + if (wot == 842) return fn(info); + __asm__ __volatile__(""); + if (wot == 843) return fn(info); + __asm__ __volatile__(""); + if (wot == 844) return fn(info); + __asm__ __volatile__(""); + if (wot == 845) return fn(info); + __asm__ __volatile__(""); + if (wot == 846) return fn(info); + __asm__ __volatile__(""); + if (wot == 847) return fn(info); + __asm__ __volatile__(""); + if (wot == 848) return fn(info); + __asm__ __volatile__(""); + if (wot == 849) return fn(info); + __asm__ __volatile__(""); + if (wot == 850) return fn(info); + __asm__ __volatile__(""); + if (wot == 851) return fn(info); + __asm__ __volatile__(""); + if (wot == 852) return fn(info); + __asm__ __volatile__(""); + if (wot == 853) return fn(info); + __asm__ __volatile__(""); + if (wot == 854) return fn(info); + __asm__ __volatile__(""); + if (wot == 855) return fn(info); + __asm__ __volatile__(""); + if (wot == 856) return fn(info); + __asm__ __volatile__(""); + if (wot == 857) return fn(info); + __asm__ __volatile__(""); + if (wot == 858) return fn(info); + __asm__ __volatile__(""); + if (wot == 859) return fn(info); + __asm__ __volatile__(""); + if (wot == 860) return fn(info); + __asm__ __volatile__(""); + if (wot == 861) return fn(info); + __asm__ __volatile__(""); + if (wot == 862) return fn(info); + __asm__ __volatile__(""); + if (wot == 863) return fn(info); + __asm__ __volatile__(""); + if (wot == 864) return fn(info); + __asm__ __volatile__(""); + if (wot == 865) return fn(info); + __asm__ __volatile__(""); + if (wot == 866) return fn(info); + __asm__ __volatile__(""); + if (wot == 867) return fn(info); + __asm__ __volatile__(""); + if (wot == 868) return fn(info); + __asm__ __volatile__(""); + if (wot == 869) return fn(info); + __asm__ __volatile__(""); + if (wot == 870) return fn(info); + __asm__ __volatile__(""); + if (wot == 871) return fn(info); + __asm__ __volatile__(""); + if (wot == 872) return fn(info); + __asm__ __volatile__(""); + if (wot == 873) return fn(info); + __asm__ __volatile__(""); + if (wot == 874) return fn(info); + __asm__ __volatile__(""); + if (wot == 875) return fn(info); + __asm__ __volatile__(""); + if (wot == 876) return fn(info); + __asm__ __volatile__(""); + if (wot == 877) return fn(info); + __asm__ __volatile__(""); + if (wot == 878) return fn(info); + __asm__ __volatile__(""); + if (wot == 879) return fn(info); + __asm__ __volatile__(""); + if (wot == 880) return fn(info); + __asm__ __volatile__(""); + if (wot == 881) return fn(info); + __asm__ __volatile__(""); + if (wot == 882) return fn(info); + __asm__ __volatile__(""); + if (wot == 883) return fn(info); + __asm__ __volatile__(""); + if (wot == 884) return fn(info); + __asm__ __volatile__(""); + if (wot == 885) return fn(info); + __asm__ __volatile__(""); + if (wot == 886) return fn(info); + __asm__ __volatile__(""); + if (wot == 887) return fn(info); + __asm__ __volatile__(""); + if (wot == 888) return fn(info); + __asm__ __volatile__(""); + if (wot == 889) return fn(info); + __asm__ __volatile__(""); + if (wot == 890) return fn(info); + __asm__ __volatile__(""); + if (wot == 891) return fn(info); + __asm__ __volatile__(""); + if (wot == 892) return fn(info); + __asm__ __volatile__(""); + if (wot == 893) return fn(info); + __asm__ __volatile__(""); + if (wot == 894) return fn(info); + __asm__ __volatile__(""); + if (wot == 895) return fn(info); + __asm__ __volatile__(""); + if (wot == 896) return fn(info); + __asm__ __volatile__(""); + if (wot == 897) return fn(info); + __asm__ __volatile__(""); + if (wot == 898) return fn(info); + __asm__ __volatile__(""); + if (wot == 899) return fn(info); + __asm__ __volatile__(""); + if (wot == 900) return fn(info); + __asm__ __volatile__(""); + if (wot == 901) return fn(info); + __asm__ __volatile__(""); + if (wot == 902) return fn(info); + __asm__ __volatile__(""); + if (wot == 903) return fn(info); + __asm__ __volatile__(""); + if (wot == 904) return fn(info); + __asm__ __volatile__(""); + if (wot == 905) return fn(info); + __asm__ __volatile__(""); + if (wot == 906) return fn(info); + __asm__ __volatile__(""); + if (wot == 907) return fn(info); + __asm__ __volatile__(""); + if (wot == 908) return fn(info); + __asm__ __volatile__(""); + if (wot == 909) return fn(info); + __asm__ __volatile__(""); + if (wot == 910) return fn(info); + __asm__ __volatile__(""); + if (wot == 911) return fn(info); + __asm__ __volatile__(""); + if (wot == 912) return fn(info); + __asm__ __volatile__(""); + if (wot == 913) return fn(info); + __asm__ __volatile__(""); + if (wot == 914) return fn(info); + __asm__ __volatile__(""); + if (wot == 915) return fn(info); + __asm__ __volatile__(""); + if (wot == 916) return fn(info); + __asm__ __volatile__(""); + if (wot == 917) return fn(info); + __asm__ __volatile__(""); + if (wot == 918) return fn(info); + __asm__ __volatile__(""); + if (wot == 919) return fn(info); + __asm__ __volatile__(""); + if (wot == 920) return fn(info); + __asm__ __volatile__(""); + if (wot == 921) return fn(info); + __asm__ __volatile__(""); + if (wot == 922) return fn(info); + __asm__ __volatile__(""); + if (wot == 923) return fn(info); + __asm__ __volatile__(""); + if (wot == 924) return fn(info); + __asm__ __volatile__(""); + if (wot == 925) return fn(info); + __asm__ __volatile__(""); + if (wot == 926) return fn(info); + __asm__ __volatile__(""); + if (wot == 927) return fn(info); + __asm__ __volatile__(""); + if (wot == 928) return fn(info); + __asm__ __volatile__(""); + if (wot == 929) return fn(info); + __asm__ __volatile__(""); + if (wot == 930) return fn(info); + __asm__ __volatile__(""); + if (wot == 931) return fn(info); + __asm__ __volatile__(""); + if (wot == 932) return fn(info); + __asm__ __volatile__(""); + if (wot == 933) return fn(info); + __asm__ __volatile__(""); + if (wot == 934) return fn(info); + __asm__ __volatile__(""); + if (wot == 935) return fn(info); + __asm__ __volatile__(""); + if (wot == 936) return fn(info); + __asm__ __volatile__(""); + if (wot == 937) return fn(info); + __asm__ __volatile__(""); + if (wot == 938) return fn(info); + __asm__ __volatile__(""); + if (wot == 939) return fn(info); + __asm__ __volatile__(""); + if (wot == 940) return fn(info); + __asm__ __volatile__(""); + if (wot == 941) return fn(info); + __asm__ __volatile__(""); + if (wot == 942) return fn(info); + __asm__ __volatile__(""); + if (wot == 943) return fn(info); + __asm__ __volatile__(""); + if (wot == 944) return fn(info); + __asm__ __volatile__(""); + if (wot == 945) return fn(info); + __asm__ __volatile__(""); + if (wot == 946) return fn(info); + __asm__ __volatile__(""); + if (wot == 947) return fn(info); + __asm__ __volatile__(""); + if (wot == 948) return fn(info); + __asm__ __volatile__(""); + if (wot == 949) return fn(info); + __asm__ __volatile__(""); + if (wot == 950) return fn(info); + __asm__ __volatile__(""); + if (wot == 951) return fn(info); + __asm__ __volatile__(""); + if (wot == 952) return fn(info); + __asm__ __volatile__(""); + if (wot == 953) return fn(info); + __asm__ __volatile__(""); + if (wot == 954) return fn(info); + __asm__ __volatile__(""); + if (wot == 955) return fn(info); + __asm__ __volatile__(""); + if (wot == 956) return fn(info); + __asm__ __volatile__(""); + if (wot == 957) return fn(info); + __asm__ __volatile__(""); + if (wot == 958) return fn(info); + __asm__ __volatile__(""); + if (wot == 959) return fn(info); + __asm__ __volatile__(""); + if (wot == 960) return fn(info); + __asm__ __volatile__(""); + if (wot == 961) return fn(info); + __asm__ __volatile__(""); + if (wot == 962) return fn(info); + __asm__ __volatile__(""); + if (wot == 963) return fn(info); + __asm__ __volatile__(""); + if (wot == 964) return fn(info); + __asm__ __volatile__(""); + if (wot == 965) return fn(info); + __asm__ __volatile__(""); + if (wot == 966) return fn(info); + __asm__ __volatile__(""); + if (wot == 967) return fn(info); + __asm__ __volatile__(""); + if (wot == 968) return fn(info); + __asm__ __volatile__(""); + if (wot == 969) return fn(info); + __asm__ __volatile__(""); + if (wot == 970) return fn(info); + __asm__ __volatile__(""); + if (wot == 971) return fn(info); + __asm__ __volatile__(""); + if (wot == 972) return fn(info); + __asm__ __volatile__(""); + if (wot == 973) return fn(info); + __asm__ __volatile__(""); + if (wot == 974) return fn(info); + __asm__ __volatile__(""); + if (wot == 975) return fn(info); + __asm__ __volatile__(""); + if (wot == 976) return fn(info); + __asm__ __volatile__(""); + if (wot == 977) return fn(info); + __asm__ __volatile__(""); + if (wot == 978) return fn(info); + __asm__ __volatile__(""); + if (wot == 979) return fn(info); + __asm__ __volatile__(""); + if (wot == 980) return fn(info); + __asm__ __volatile__(""); + if (wot == 981) return fn(info); + __asm__ __volatile__(""); + if (wot == 982) return fn(info); + __asm__ __volatile__(""); + if (wot == 983) return fn(info); + __asm__ __volatile__(""); + if (wot == 984) return fn(info); + __asm__ __volatile__(""); + if (wot == 985) return fn(info); + __asm__ __volatile__(""); + if (wot == 986) return fn(info); + __asm__ __volatile__(""); + if (wot == 987) return fn(info); + __asm__ __volatile__(""); + if (wot == 988) return fn(info); + __asm__ __volatile__(""); + if (wot == 989) return fn(info); + __asm__ __volatile__(""); + if (wot == 990) return fn(info); + __asm__ __volatile__(""); + if (wot == 991) return fn(info); + __asm__ __volatile__(""); + if (wot == 992) return fn(info); + __asm__ __volatile__(""); + if (wot == 993) return fn(info); + __asm__ __volatile__(""); + if (wot == 994) return fn(info); + __asm__ __volatile__(""); + if (wot == 995) return fn(info); + __asm__ __volatile__(""); + if (wot == 996) return fn(info); + __asm__ __volatile__(""); + if (wot == 997) return fn(info); + __asm__ __volatile__(""); + if (wot == 998) return fn(info); + __asm__ __volatile__(""); + if (wot == 999) return fn(info); + __asm__ __volatile__(""); + assert(0); + return 0; /* keep gcc happy on AIX */ +} diff --git a/helgrind/tests/.svn/text-base/tc19_shadowmem.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc19_shadowmem.stderr.exp.svn-base new file mode 100644 index 0000000..1e580d2 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc19_shadowmem.stderr.exp.svn-base @@ -0,0 +1,15304 @@ + + +=========================================================== +=== 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 === +=========================================================== + +---------- char gran, 0 .. 99, skip 0 ---------- +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 1 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 2 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 3 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 4 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 5 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 6 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 7 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 8 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 9 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 10 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 11 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 12 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 13 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 14 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 15 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 16 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 17 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 18 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 19 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 20 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 21 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 22 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 23 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 24 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 25 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 26 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 27 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 28 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 29 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 30 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 31 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 32 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 33 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 34 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 35 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 36 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 37 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 38 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 39 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 40 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 41 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 42 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 43 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 44 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 45 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 46 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 47 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 48 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 49 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 50 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 51 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 52 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 53 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 54 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 55 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 56 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 57 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 58 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 59 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 60 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 61 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 62 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 63 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 64 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 65 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 66 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 67 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 68 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 69 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 70 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 71 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 72 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 73 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 74 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 75 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 76 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 77 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 78 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 79 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 80 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 81 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 82 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 83 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 84 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 85 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 86 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 87 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 88 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 89 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 90 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 91 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 92 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:472) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:472) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 93 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 94 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 95 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 96 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:480) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:480) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 97 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:482) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:482) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 98 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:484) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:484) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +========================================================== +=== 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 === +========================================================== + +---------- short gran, 0 .. 98, skip 0 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +More than 100 errors detected. Subsequent errors +will still be recorded, but in less detail than before. +---------- short gran, 1 .. 98, skip 1 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 2 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 3 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 4 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 5 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 6 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 7 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 8 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 9 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 10 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 11 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 12 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 13 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 14 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 15 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 16 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 17 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 18 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 19 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 20 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 21 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 22 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 23 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 24 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 25 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 26 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 27 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 28 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 29 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 30 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 31 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 32 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 33 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 34 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 35 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 36 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 37 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 38 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 39 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 40 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 41 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 42 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 43 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 44 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 45 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 46 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 47 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 48 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 49 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 50 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 51 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 52 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 53 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 54 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 55 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 56 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 57 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 58 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 59 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 60 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 61 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 62 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 63 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 64 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 65 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 66 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 67 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 68 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 69 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 70 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 71 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 72 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 73 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 74 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 75 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 76 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 77 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 78 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 79 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 80 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 81 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 82 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 83 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 84 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 85 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 86 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 87 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 88 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 89 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 90 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 91 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 92 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:472) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:472) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 93 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 94 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 95 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 96 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:480) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:480) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 97 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:482) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:482) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:482) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:482) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +========================================================== +=== 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 === +========================================================== + +---------- int gran, 0 .. 96, skip 0 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 1 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 2 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 3 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 4 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 5 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 6 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 7 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 8 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 9 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 10 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 11 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 12 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 13 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 14 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 15 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 16 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 17 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 18 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 19 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 20 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 21 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 22 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 23 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 24 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 25 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 26 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 27 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 28 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 29 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 30 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 31 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 32 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 33 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 34 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 35 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 36 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 37 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 38 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 39 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 40 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 41 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 42 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 43 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 44 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 45 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 46 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 47 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 48 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 49 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 50 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 51 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 52 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 53 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 54 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 55 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 56 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 57 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 58 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 59 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 60 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 61 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 62 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 63 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 64 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 65 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 66 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 67 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 68 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 69 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 70 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 71 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 72 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 73 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 74 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 75 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 76 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 77 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 78 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 79 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 80 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 81 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 82 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 83 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 84 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 85 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 86 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 87 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 88 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 89 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 90 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 91 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 92 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:472) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:472) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 93 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 94 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 95 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +========================================================== +=== 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 === +========================================================== + +---------- double gran, 0 .. 92, skip 0 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 1 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 2 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 3 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 4 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 5 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 6 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 7 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 8 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 9 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 10 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 11 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 12 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 13 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 14 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 15 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 16 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 17 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 18 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 19 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 20 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 21 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 22 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 23 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 24 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 25 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 26 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 27 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 28 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 29 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 30 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 31 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 32 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 33 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 34 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 35 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 36 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 37 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 38 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 39 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 40 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 41 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 42 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 43 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 44 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 45 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 46 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 47 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 48 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 49 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 50 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 51 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 52 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 53 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 54 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 55 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 56 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 57 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 58 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 59 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 60 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 61 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 62 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 63 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 64 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 65 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 66 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 67 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 68 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 69 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 70 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 71 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 72 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 73 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 74 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 75 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 76 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 77 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 78 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 79 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 80 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 81 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 82 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 83 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 84 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 85 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 86 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 87 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 88 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 89 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 90 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 91 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +ERROR SUMMARY: 1004 errors from 1004 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc19_shadowmem.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc19_shadowmem.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc19_shadowmem.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc19_shadowmem.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc19_shadowmem.vgtest.svn-base new file mode 100644 index 0000000..233e8e4 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc19_shadowmem.vgtest.svn-base @@ -0,0 +1,2 @@ +prog: tc19_shadowmem +vgopts: --cmp-race-err-addrs=yes --error-limit=no diff --git a/helgrind/tests/.svn/text-base/tc20_verifywrap.c.svn-base b/helgrind/tests/.svn/text-base/tc20_verifywrap.c.svn-base new file mode 100644 index 0000000..667aafa --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc20_verifywrap.c.svn-base @@ -0,0 +1,270 @@ +/* This program attempts to verify that all functions that are + supposed to be wrapped by tc_intercepts.c really are wrapped. The + main way it does this is to cause failures in those functions, so + as to obtain various error messages which imply that the wrapper + really did engage. + + Any regressions shown up by this program are potentially serious + and should be investigated carefully. */ + +/* Needed for older glibcs (2.3 and older, at least) who don't + otherwise "know" about some more exotic pthread stuff, in this case + PTHREAD_MUTEX_ERRORCHECK. */ +#define _GNU_SOURCE 1 +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <unistd.h> +#include <pthread.h> +#include <semaphore.h> + +#if !defined(_AIX) + +#if !defined(__GLIBC_PREREQ) +# error "This program needs __GLIBC_PREREQ (in /usr/include/features.h)" +#endif + +short unprotected = 0; + +void* lazy_child ( void* v ) { + assert(0); /* does not run */ +} + +void* racy_child ( void* v ) { + unprotected = 1234; + return NULL; +} + +int main ( void ) +{ + int r; + /* pthread_t thr; */ + /* pthread_attr_t thra; */ + pthread_mutexattr_t mxa, mxa2; + pthread_mutex_t mx, mx2, mx3, mx4; + pthread_cond_t cv; + struct timespec abstime; + pthread_rwlock_t rwl; + pthread_rwlock_t rwl2; + pthread_rwlock_t rwl3; + sem_t s1; + +# if __GLIBC_PREREQ(2,4) + fprintf(stderr, + "\n\n------ This is output for >= glibc 2.4 ------\n"); +# else + fprintf(stderr, + "\n\n------ This is output for < glibc 2.4 ------\n"); +# endif + + /* --------- pthread_create/join --------- */ + + fprintf(stderr, + "\n---------------- pthread_create/join ----------------\n\n"); + + /* make pthread_create fail */ + /* It's amazingly difficult to make pthread_create fail + without first soaking up all the machine's resources. + Instead, in order to demonstrate that it's really wrapped, + create a child thread, generate a race error, and join with it + again. */ + /* This just segfaults: + memset( &thra, 0xFF, sizeof(thra) ); + r= pthread_create( &thr, NULL, lazy_child, NULL ); assert(r); + */ + { pthread_t child; + r= pthread_create( &child, NULL, racy_child, NULL ); assert(!r); + sleep(1); /* just to ensure parent thread reports race, not child */ + unprotected = 5678; + r= pthread_join( child, NULL ); assert(!r); + } + + /* make pthread_join fail */ + r= pthread_join( pthread_self(), NULL ); assert(r); + + /* --------- pthread_mutex_lock et al --------- */ + + fprintf(stderr, + "\n---------------- pthread_mutex_lock et al ----------------\n\n"); + + /* make pthread_mutex_init fail */ + memset( &mxa, 0xFF, sizeof(mxa) ); + r= pthread_mutex_init( &mx, &mxa ); +# if __GLIBC_PREREQ(2,4) + assert(r); /* glibc >= 2.4: the call should fail */ +# else + assert(!r); /* glibc < 2.4: oh well, glibc didn't bounce this */ +# endif + + /* make pthread_mutex_destroy fail */ + r= pthread_mutex_init( &mx2, NULL ); assert(!r); + r= pthread_mutex_lock( &mx2 ); assert(!r); + r= pthread_mutex_destroy( &mx2 ); assert(r); + + /* make pthread_mutex_lock fail (skipped on < glibc 2.4 because it + doesn't fail, hence hangs the test) */ +# if __GLIBC_PREREQ(2,4) + memset( &mx3, 0xFF, sizeof(mx3) ); + r= pthread_mutex_lock( &mx3 ); assert(r); +# else + fprintf(stderr, "\nmake pthread_mutex_lock fail: " + "skipped on glibc < 2.4\n\n"); +# endif + + /* make pthread_mutex_trylock fail */ + memset( &mx3, 0xFF, sizeof(mx3) ); + r= pthread_mutex_trylock( &mx3 ); assert(r); + + /* make pthread_mutex_timedlock fail */ + memset( &abstime, 0, sizeof(abstime) ); + memset( &mx3, 0xFF, sizeof(mx3) ); + r= pthread_mutex_timedlock( &mx3, &abstime ); assert(r); + + /* make pthread_mutex_unlock fail */ + memset( &mx3, 0xFF, sizeof(mx3) ); + r= pthread_mutex_unlock( &mx3 ); +# if __GLIBC_PREREQ(2,4) + assert(r); +# else + assert(!r); +# endif + + /* --------- pthread_cond_wait et al --------- */ + + fprintf(stderr, + "\n---------------- pthread_cond_wait et al ----------------\n\n"); + + /* make pthread_cond_wait fail. This is difficult. Our cunning + plan (tm) is to show up at pthread_cond_wait bearing a + not-locked mutex of the ERRORCHECK flavour and hope (as is + indeed the case with glibc-2.5) that pthread_cond_wait notices + it is not locked, and bounces our request. */ + r= pthread_mutexattr_init( &mxa2 ); assert(!r); + r= pthread_mutexattr_settype( &mxa2, PTHREAD_MUTEX_ERRORCHECK ); + assert(!r); + r= pthread_mutex_init( &mx4, &mxa2 ); assert(!r); + r= pthread_cond_init( &cv, NULL ); assert(!r); + r= pthread_cond_wait( &cv, &mx4 ); assert(r); + r= pthread_mutexattr_destroy( &mxa2 ); assert(!r); + + /* make pthread_cond_signal fail. FIXME: can't figure out how + to */ + r= pthread_cond_signal( &cv ); assert(!r); + fprintf(stderr, "\nFIXME: can't figure out how to " + "verify wrap of pthread_cond_signal\n\n"); + + /* make pthread_cond_broadcast fail. FIXME: can't figure out how + to */ + r= pthread_cond_broadcast( &cv ); assert(!r); + fprintf(stderr, "\nFIXME: can't figure out how to " + "verify wrap of pthread_broadcast_signal\n\n"); + + /* make pthread_cond_timedwait fail. */ + memset( &abstime, 0, sizeof(abstime) ); + abstime.tv_nsec = 1000000000 + 1; + r= pthread_cond_timedwait( &cv, &mx4, &abstime ); assert(r); + + /* --------- pthread_rwlock_* --------- */ + + fprintf(stderr, + "\n---------------- pthread_rwlock_* ----------------\n\n"); + + /* pthread_rwlock_init, pthread_rwlock_unlock */ + /* pthread_rwlock_init: can't make glibc's implementation fail. + However, can demonstrate interceptedness by initialising but not + locking a lock and then unlocking it. Then the unlock call + should say "first seen at .. the init call." So this tests + wrappedness of both calls. */ + r= pthread_rwlock_init( &rwl, NULL ); assert(!r); + r= pthread_rwlock_unlock( &rwl ); + /* assert(r); *//* glibc doesn't complain. It really ought to. Oh well. */ + + /* We can infer the presence of wrapping for pthread_rwlock_rdlock, + pthread_rwlock_wrlock and pthread_rwlock_unlock by making + Thrcheck count the lockedness state, and warning when we unlock + a not-locked lock. Thusly: */ + r= pthread_rwlock_init( &rwl2, NULL ); assert(!r); + + /* w-lock it */ + fprintf(stderr, "(1) no error on next line\n"); + r= pthread_rwlock_wrlock( &rwl2 ); assert(!r); + /* unlock it */ + fprintf(stderr, "(2) no error on next line\n"); + r= pthread_rwlock_unlock( &rwl2 ); assert(!r); + /* unlock it again, get an error */ + fprintf(stderr, "(3) ERROR on next line\n"); + r= pthread_rwlock_unlock( &rwl2 ); assert(!r); + + /* same game with r-locks */ + r= pthread_rwlock_init( &rwl2, NULL ); assert(!r); + /* r-lock it twice */ + fprintf(stderr, "(4) no error on next line\n"); + r= pthread_rwlock_rdlock( &rwl2 ); assert(!r); + fprintf(stderr, "(5) no error on next line\n"); + r= pthread_rwlock_rdlock( &rwl2 ); assert(!r); + /* unlock it twice */ + fprintf(stderr, "(6) no error on next line\n"); + r= pthread_rwlock_unlock( &rwl2 ); assert(!r); + fprintf(stderr, "(7) no error on next line\n"); + r= pthread_rwlock_unlock( &rwl2 ); assert(!r); + /* unlock it again, get an error */ + fprintf(stderr, "(8) ERROR on next line\n"); + r= pthread_rwlock_unlock( &rwl2 ); assert(!r); + + /* Lock rwl3 so the locked-lock-at-dealloc check can complain about + it. */ + r= pthread_rwlock_init( &rwl3, NULL ); assert(!r); + r= pthread_rwlock_rdlock( &rwl3 ); assert(!r); + + /* ------------- sem_* ------------- */ + + /* This is pretty lame, and duplicates tc18_semabuse.c. */ + + fprintf(stderr, + "\n---------------- sem_* ----------------\n\n"); + + /* verifies wrap of sem_init */ + /* Do sem_init with huge initial count - fails */ + r= sem_init(&s1, 0, ~0); assert(r); + + /* initialise properly */ + r= sem_init(&s1, 0, 0); + + /* in glibc, sem_destroy is a no-op; making it fail is + impossible. */ + fprintf(stderr, "\nFIXME: can't figure out how to verify wrap of " + "sem_destroy\n\n"); + + /* verifies wrap of sem_wait */ + /* Do 'wait' on a bogus semaphore. This should fail, but on glibc + it succeeds. */ + memset(&s1, 0x55, sizeof(s1)); + r= sem_wait(&s1); /* assert(r != 0); */ + + /* this only fails with glibc 2.7 or later. */ + r= sem_post(&s1); + fprintf(stderr, "\nFIXME: can't figure out how to verify wrap of " + "sem_post\n\n"); + + sem_destroy(&s1); + + /* ------------- dealloc of mem holding locks ------------- */ + + fprintf(stderr, + "\n------------ dealloc of mem holding locks ------------\n\n"); + + /* At this point it should complain about deallocation + of memory containing locked locks: + rwl3 + */ + + return 0; +} + +#else /* defined(_AIX) */ +int main ( void ) +{ + fprintf(stderr, "This program does not work on AIX.\n"); + return 0; +} +#endif diff --git a/helgrind/tests/.svn/text-base/tc20_verifywrap.stderr.exp-glibc25-amd64.svn-base b/helgrind/tests/.svn/text-base/tc20_verifywrap.stderr.exp-glibc25-amd64.svn-base new file mode 100644 index 0000000..5d001f5 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc20_verifywrap.stderr.exp-glibc25-amd64.svn-base @@ -0,0 +1,154 @@ + + + +------ This is output for >= glibc 2.4 ------ + +---------------- pthread_create/join ---------------- + +Thread #x is the program's root thread + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:76) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: main (tc20_verifywrap.c:78) + This conflicts with a previous write of size 2 by thread #x + at 0x........: racy_child (tc20_verifywrap.c:34) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "unprotected" + declared at tc20_verifywrap.c:27 + +Thread #x's call to pthread_join failed + with error code 35 (EDEADLK: Resource deadlock would occur) + at 0x........: pthread_join (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:83) + +---------------- pthread_mutex_lock et al ---------------- + + +Thread #x's call to pthread_mutex_init failed + with error code 95 (EOPNOTSUPP: Operation not supported on transport endpoint) + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:92) + +Thread #x: pthread_mutex_destroy of a locked mutex + at 0x........: pthread_mutex_destroy (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:102) + +Thread #x's call to pthread_mutex_destroy failed + with error code 16 (EBUSY: Device or resource busy) + at 0x........: pthread_mutex_destroy (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:102) + +Thread #x's call to pthread_mutex_lock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:108) + +Thread #x's call to pthread_mutex_trylock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_trylock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:116) + +Thread #x's call to pthread_mutex_timedlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_timedlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:121) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:125) + +Thread #x's call to pthread_mutex_unlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:125) + +---------------- pthread_cond_wait et al ---------------- + + +Thread #x: pthread_cond_{timed}wait called with un-held mutex + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:147) + +Thread #x's call to pthread_cond_wait failed + with error code 1 (EPERM: Operation not permitted) + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:147) + +FIXME: can't figure out how to verify wrap of pthread_cond_signal + + +FIXME: can't figure out how to verify wrap of pthread_broadcast_signal + + +Thread #x: pthread_cond_{timed}wait called with un-held mutex + at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:165) + +Thread #x's call to pthread_cond_timedwait failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:165) + +---------------- pthread_rwlock_* ---------------- + + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:179) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:178) +(1) no error on next line +(2) no error on next line +(3) ERROR on next line + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:196) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:186) +(4) no error on next line +(5) no error on next line +(6) no error on next line +(7) no error on next line +(8) ERROR on next line + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:212) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:186) + +---------------- sem_* ---------------- + + +Thread #x's call to sem_init failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: sem_init@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:228) + +FIXME: can't figure out how to verify wrap of sem_destroy + + +Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post + at 0x........: sem_wait_WRK (hg_intercepts.c:...) + by 0x........: sem_wait (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:242) + +FIXME: can't figure out how to verify wrap of sem_post + + +------------ dealloc of mem holding locks ------------ + + +Thread #x: Exiting thread still holds 1 lock + ... + +ERROR SUMMARY: 20 errors from 20 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc20_verifywrap.stderr.exp-glibc27-amd64.svn-base b/helgrind/tests/.svn/text-base/tc20_verifywrap.stderr.exp-glibc27-amd64.svn-base new file mode 100644 index 0000000..6e9af75 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc20_verifywrap.stderr.exp-glibc27-amd64.svn-base @@ -0,0 +1,160 @@ + + + +------ This is output for >= glibc 2.4 ------ + +---------------- pthread_create/join ---------------- + +Thread #x is the program's root thread + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:76) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: main (tc20_verifywrap.c:78) + This conflicts with a previous write of size 2 by thread #x + at 0x........: racy_child (tc20_verifywrap.c:34) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "unprotected" + declared at tc20_verifywrap.c:27 + +Thread #x's call to pthread_join failed + with error code 35 (EDEADLK: Resource deadlock would occur) + at 0x........: pthread_join (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:83) + +---------------- pthread_mutex_lock et al ---------------- + + +Thread #x's call to pthread_mutex_init failed + with error code 95 (EOPNOTSUPP: Operation not supported on transport endpoint) + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:92) + +Thread #x: pthread_mutex_destroy of a locked mutex + at 0x........: pthread_mutex_destroy (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:102) + +Thread #x's call to pthread_mutex_destroy failed + with error code 16 (EBUSY: Device or resource busy) + at 0x........: pthread_mutex_destroy (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:102) + +Thread #x's call to pthread_mutex_lock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:108) + +Thread #x's call to pthread_mutex_trylock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_trylock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:116) + +Thread #x's call to pthread_mutex_timedlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_timedlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:121) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:125) + +Thread #x's call to pthread_mutex_unlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:125) + +---------------- pthread_cond_wait et al ---------------- + + +Thread #x: pthread_cond_{timed}wait called with un-held mutex + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:147) + +Thread #x's call to pthread_cond_wait failed + with error code 1 (EPERM: Operation not permitted) + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:147) + +FIXME: can't figure out how to verify wrap of pthread_cond_signal + + +FIXME: can't figure out how to verify wrap of pthread_broadcast_signal + + +Thread #x: pthread_cond_{timed}wait called with un-held mutex + at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:165) + +Thread #x's call to pthread_cond_timedwait failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:165) + +---------------- pthread_rwlock_* ---------------- + + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:179) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:178) +(1) no error on next line +(2) no error on next line +(3) ERROR on next line + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:196) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:186) +(4) no error on next line +(5) no error on next line +(6) no error on next line +(7) no error on next line +(8) ERROR on next line + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:212) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:186) + +---------------- sem_* ---------------- + + +Thread #x's call to sem_init failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: sem_init@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:228) + +FIXME: can't figure out how to verify wrap of sem_destroy + + +Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post + at 0x........: sem_wait_WRK (hg_intercepts.c:...) + by 0x........: sem_wait (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:242) + +Thread #x's call to sem_post failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: sem_post_WRK (hg_intercepts.c:...) + by 0x........: sem_post (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:245) + +FIXME: can't figure out how to verify wrap of sem_post + + +------------ dealloc of mem holding locks ------------ + + +Thread #x: Exiting thread still holds 1 lock + ... + +ERROR SUMMARY: 21 errors from 21 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc20_verifywrap.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc20_verifywrap.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc20_verifywrap.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc20_verifywrap.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc20_verifywrap.vgtest.svn-base new file mode 100644 index 0000000..7683e8a --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc20_verifywrap.vgtest.svn-base @@ -0,0 +1,2 @@ +prog: tc20_verifywrap +vgopts: --read-var-info=yes diff --git a/helgrind/tests/.svn/text-base/tc21_pthonce.c.svn-base b/helgrind/tests/.svn/text-base/tc21_pthonce.c.svn-base new file mode 100644 index 0000000..69fac76 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc21_pthonce.c.svn-base @@ -0,0 +1,96 @@ + +/* This really exists to check that Thrcheck behaves plausibly + with pthread_once calls. Which it appears to. + + The original source of this program is as shown below, although it + has been modified somewhat. See + http://www.oreilly.com/pub/a/oreilly/ask_tim/2001/codepolicy.html + for OReilly's policy on using bits of their code examples. +*/ + + +/******************************************************** + * An example source module to accompany... + * + * "Using POSIX Threads: Programming with Pthreads" + * by Brad Nichols, Dick Buttlar, Jackie Farrell + * O'Reilly & Associates, Inc. + * + ******************************************************** + * once_exam.c + * + * An example of using the pthreads_once() call to execute an + * initialization procedure. + * + * A program spawns multiple threads and each one tries to + * execute the routine welcome() using the once call. Only + * the first thread into the once routine will actually + * execute welcome(). + * + * The program's main thread synchronizes its exit with the + * exit of the threads using the pthread_join() operation. + * +*/ + +#include <stdlib.h> +#include <stdio.h> +#include <unistd.h> +#include <sys/types.h> +#include <assert.h> + +#include <pthread.h> + +/* With more than 2 threads, the precise error reports vary between + platforms, in terms of the number of races detected. Make life + simple and just have 2 threads and so just 1 race. */ +#define NUM_THREADS 2 + +static pthread_once_t welcome_once_block = PTHREAD_ONCE_INIT; + +static int unprotected1 = 0; +static int unprotected2 = 0; + +/* This is a hack: delay threads except the first enough so as to + ensure threads[0] gets to the pthread_once call first. This is so + as to ensure that this test produces results which aren't + scheduling sensitive. (sigh) */ +void maybe_stall ( int myid ) +{ + assert(myid >= 0 && myid < NUM_THREADS); + if (myid > 0) + sleep(1); +} + +void welcome(void) { + printf("welcome: Welcome\n"); + unprotected1++; /* this is harmless */ +} + +void* child ( void* argV ) { + int r; + maybe_stall( *(int*)argV ); + r= pthread_once(&welcome_once_block, welcome); assert(!r); + printf("child: Hi, I'm thread %d\n", *(int*)argV); + unprotected2++; /* whereas this is a race */ + return NULL; +} + +int main ( void ) { + int *id_arg, i, r; + pthread_t threads[NUM_THREADS]; + + id_arg = (int *)malloc(NUM_THREADS*sizeof(int)); + + for (i = 0; i < NUM_THREADS; i++) { + id_arg[i] = i; + r= pthread_create(&threads[i], NULL, child, &id_arg[i]); + assert(!r); + } + + for (i = 0; i < NUM_THREADS; i++) { + pthread_join(threads[i], NULL); + /* printf("main: joined to thread %d\n", i); */ + } + printf("main: Goodbye\n"); + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc21_pthonce.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc21_pthonce.stderr.exp.svn-base new file mode 100644 index 0000000..65cae9a --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc21_pthonce.stderr.exp.svn-base @@ -0,0 +1,34 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc21_pthonce.c:86) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc21_pthonce.c:86) + +Possible data race during read of size 4 at 0x........ by thread #x + at 0x........: child (tc21_pthonce.c:74) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child (tc21_pthonce.c:74) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside local var "unprotected2" + declared at tc21_pthonce.c:51, in frame #x of thread x + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child (tc21_pthonce.c:74) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child (tc21_pthonce.c:74) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside local var "unprotected2" + declared at tc21_pthonce.c:51, in frame #x of thread x + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc21_pthonce.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc21_pthonce.stdout.exp.svn-base new file mode 100644 index 0000000..e6c2dc2 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc21_pthonce.stdout.exp.svn-base @@ -0,0 +1,4 @@ +welcome: Welcome +child: Hi, I'm thread 0 +child: Hi, I'm thread 1 +main: Goodbye diff --git a/helgrind/tests/.svn/text-base/tc21_pthonce.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc21_pthonce.vgtest.svn-base new file mode 100644 index 0000000..0887de8 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc21_pthonce.vgtest.svn-base @@ -0,0 +1,2 @@ +prog: tc21_pthonce +vgopts: --read-var-info=yes diff --git a/helgrind/tests/.svn/text-base/tc22_exit_w_lock.c.svn-base b/helgrind/tests/.svn/text-base/tc22_exit_w_lock.c.svn-base new file mode 100644 index 0000000..d40600e --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc22_exit_w_lock.c.svn-base @@ -0,0 +1,50 @@ + +#include <pthread.h> +#include <unistd.h> +#include <assert.h> +#include <signal.h> + +/* Should see 3 threads exiting in different ways, all holding one (or + two) locks. */ + +pthread_mutex_t mxC1 = PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t mxC2 = PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t mxC2b = PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t mxP = PTHREAD_MUTEX_INITIALIZER; + +/* This one exits in the normal way, by joining back */ +void* child_fn1 ( void* arg ) +{ + int r= pthread_mutex_lock( &mxC1 ); assert(!r); + return NULL; +} + +/* This one detaches, does its own thing. */ +void* child_fn2 ( void* arg ) +{ + int r; + r= pthread_mutex_lock( &mxC2 ); assert(!r); + r= pthread_mutex_lock( &mxC2b ); assert(!r); + r= pthread_detach( pthread_self() ); assert(!r); + return NULL; +} + +/* Parent creates 2 children, takes a lock, waits, segfaults. Use + sleeps to enforce exit ordering, for repeatable regtesting. */ +int main ( void ) +{ + int r; + pthread_t child1, child2; + + r= pthread_create(&child2, NULL, child_fn2, NULL); assert(!r); + sleep(1); + + r= pthread_create(&child1, NULL, child_fn1, NULL); assert(!r); + r= pthread_join(child1, NULL); assert(!r); + sleep(1); + + r= pthread_mutex_lock( &mxP ); + + kill( getpid(), SIGABRT ); + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc22_exit_w_lock.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc22_exit_w_lock.stderr.exp.svn-base new file mode 100644 index 0000000..74139f1 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc22_exit_w_lock.stderr.exp.svn-base @@ -0,0 +1,23 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc22_exit_w_lock.c:39) + +Thread #x: Exiting thread still holds 2 locks + ... + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc22_exit_w_lock.c:42) + +Thread #x: Exiting thread still holds 1 lock + ... + +Thread #x is the program's root thread + +Thread #x: Exiting thread still holds 1 lock + ... + +ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc22_exit_w_lock.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc22_exit_w_lock.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc22_exit_w_lock.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc22_exit_w_lock.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc22_exit_w_lock.vgtest.svn-base new file mode 100644 index 0000000..4f85dd5 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc22_exit_w_lock.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc22_exit_w_lock diff --git a/helgrind/tests/.svn/text-base/tc23_bogus_condwait.c.svn-base b/helgrind/tests/.svn/text-base/tc23_bogus_condwait.c.svn-base new file mode 100644 index 0000000..a0fad5d --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc23_bogus_condwait.c.svn-base @@ -0,0 +1,86 @@ + +/* Expect 5 errors total (4 re cvs, 1 re exiting w/lock.). + Tests passing bogus mutexes to pthread_cond_wait. */ +#define _GNU_SOURCE 1 /* needed by glibc <= 2.3 for pthread_rwlock_* */ +#include <pthread.h> +#include <assert.h> +#include <unistd.h> +#include <semaphore.h> + +pthread_mutex_t mx[4]; +pthread_cond_t cv; +pthread_rwlock_t rwl; + +sem_t quit_now; + +void* rescue_me ( void* uu ) +{ + /* wait for, and unblock, the first wait */ + sleep(1); + pthread_cond_signal( &cv ); + + /* wait for, and unblock, the second wait */ + sleep(1); + pthread_cond_signal( &cv ); + + /* wait for, and unblock, the third wait */ + sleep(1); + pthread_cond_signal( &cv ); + + /* wait for, and unblock, the fourth wait */ + sleep(1); + pthread_cond_signal( &cv ); + + sem_wait( &quit_now ); + return NULL; +} + +void* grab_the_lock ( void* uu ) +{ + int r= pthread_mutex_lock( &mx[2] ); assert(!r); + sem_wait( &quit_now ); + r= pthread_mutex_unlock( &mx[2] ); assert(!r); + return NULL; +} + +int main ( void ) +{ + int r; + pthread_t my_rescuer, grabber; + + r= pthread_mutex_init(&mx[0], NULL); assert(!r); + r= pthread_mutex_init(&mx[1], NULL); assert(!r); + r= pthread_mutex_init(&mx[2], NULL); assert(!r); + r= pthread_mutex_init(&mx[3], NULL); assert(!r); + + r= pthread_cond_init(&cv, NULL); assert(!r); + r= pthread_rwlock_init(&rwl, NULL); assert(!r); + + r= sem_init( &quit_now, 0,0 ); assert(!r); + + r= pthread_create( &grabber, NULL, grab_the_lock, NULL ); assert(!r); + sleep(1); /* let the grabber get there first */ + + r= pthread_create( &my_rescuer, NULL, rescue_me, NULL ); assert(!r); + /* Do stupid things and hope that rescue_me gets us out of + trouble */ + + /* mx is bogus */ + r= pthread_cond_wait(&cv, (pthread_mutex_t*)(1 + (char*)&mx[0]) ); + + /* mx is not locked */ + r= pthread_cond_wait(&cv, &mx[0]); + + /* wrong flavour of lock */ + r= pthread_cond_wait(&cv, (pthread_mutex_t*)&rwl ); + + /* mx is held by someone else. */ + r= pthread_cond_wait(&cv, &mx[2] ); + + r= sem_post( &quit_now ); assert(!r); + r= sem_post( &quit_now ); assert(!r); + + r= pthread_join( my_rescuer, NULL ); assert(!r); + r= pthread_join( grabber, NULL ); assert(!r); + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc23_bogus_condwait.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc23_bogus_condwait.stderr.exp.svn-base new file mode 100644 index 0000000..d80ee1a --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc23_bogus_condwait.stderr.exp.svn-base @@ -0,0 +1,20 @@ + +Thread #x is the program's root thread + +Thread #x: pthread_cond_{timed}wait called with invalid mutex + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc23_bogus_condwait.c:69) + +Thread #x: pthread_cond_{timed}wait called with un-held mutex + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc23_bogus_condwait.c:72) + +Thread #x: pthread_cond_{timed}wait called with mutex of type pthread_rwlock_t* + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc23_bogus_condwait.c:75) + +Thread #x: pthread_cond_{timed}wait called with mutex held by a different thread + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc23_bogus_condwait.c:78) + +ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc23_bogus_condwait.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc23_bogus_condwait.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc23_bogus_condwait.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc23_bogus_condwait.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc23_bogus_condwait.vgtest.svn-base new file mode 100644 index 0000000..31c3ed8 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc23_bogus_condwait.vgtest.svn-base @@ -0,0 +1 @@ +prog: tc23_bogus_condwait diff --git a/helgrind/tests/.svn/text-base/tc24_nonzero_sem.c.svn-base b/helgrind/tests/.svn/text-base/tc24_nonzero_sem.c.svn-base new file mode 100644 index 0000000..01c23e8 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc24_nonzero_sem.c.svn-base @@ -0,0 +1,41 @@ + +/* Check that Helgrind does not complain about semaphores with a + nonzero initial value, when said semaphores are correctly used. + Also useful for generating VCG of simple semaphore activity, for + inspection. */ + +#include <pthread.h> +#include <semaphore.h> +#include <assert.h> + +#define N_THREADS 3 + +void* child_fn ( void* semV ) +{ + int r; + sem_t* sem = (sem_t*)semV; + r= sem_wait(sem); assert(!r); + return NULL; +} + +int main ( void ) +{ + int r, i; + sem_t sem; + pthread_t child[N_THREADS]; + + r= sem_init(&sem, 0, N_THREADS); assert(!r); + + for (i = 0; i < N_THREADS; i++) { + r= pthread_create( &child[i], NULL, child_fn, (void*)&sem ); + assert(!r); + } + + for (i = 0; i < N_THREADS; i++) { + r= pthread_join( child[i], NULL ); + assert(!r); + } + + sem_destroy(&sem); + return 0; +} diff --git a/helgrind/tests/.svn/text-base/tc24_nonzero_sem.stderr.exp.svn-base b/helgrind/tests/.svn/text-base/tc24_nonzero_sem.stderr.exp.svn-base new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc24_nonzero_sem.stderr.exp.svn-base @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/.svn/text-base/tc24_nonzero_sem.stdout.exp.svn-base b/helgrind/tests/.svn/text-base/tc24_nonzero_sem.stdout.exp.svn-base new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc24_nonzero_sem.stdout.exp.svn-base diff --git a/helgrind/tests/.svn/text-base/tc24_nonzero_sem.vgtest.svn-base b/helgrind/tests/.svn/text-base/tc24_nonzero_sem.vgtest.svn-base new file mode 100644 index 0000000..1a43121 --- /dev/null +++ b/helgrind/tests/.svn/text-base/tc24_nonzero_sem.vgtest.svn-base @@ -0,0 +1,2 @@ +prog: tc24_nonzero_sem +vgopts: --hg-sanity-flags=111111 diff --git a/helgrind/tests/Makefile b/helgrind/tests/Makefile new file mode 100644 index 0000000..313d02b --- /dev/null +++ b/helgrind/tests/Makefile @@ -0,0 +1,908 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# helgrind/tests/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# This file is used for tool tests, and also in perf/Makefile.am. + + +pkgdatadir = $(datadir)/valgrind +pkglibdir = $(libdir)/valgrind +pkgincludedir = $(includedir)/valgrind +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/Makefile.flags.am \ + $(top_srcdir)/Makefile.tool-tests.am +check_PROGRAMS = hg01_all_ok$(EXEEXT) hg02_deadlock$(EXEEXT) \ + hg03_inherit$(EXEEXT) hg04_race$(EXEEXT) hg05_race2$(EXEEXT) \ + hg06_readshared$(EXEEXT) tc01_simple_race$(EXEEXT) \ + tc02_simple_tls$(EXEEXT) tc03_re_excl$(EXEEXT) \ + tc04_free_lock$(EXEEXT) tc05_simple_race$(EXEEXT) \ + tc06_two_races$(EXEEXT) tc07_hbl1$(EXEEXT) tc08_hbl2$(EXEEXT) \ + tc09_bad_unlock$(EXEEXT) tc10_rec_lock$(EXEEXT) \ + tc11_XCHG$(EXEEXT) tc12_rwl_trivial$(EXEEXT) \ + tc13_laog1$(EXEEXT) tc14_laog_dinphils$(EXEEXT) \ + tc15_laog_lockdel$(EXEEXT) tc16_byterace$(EXEEXT) \ + tc17_sembar$(EXEEXT) tc18_semabuse$(EXEEXT) \ + tc19_shadowmem$(EXEEXT) tc20_verifywrap$(EXEEXT) \ + tc21_pthonce$(EXEEXT) tc22_exit_w_lock$(EXEEXT) \ + tc23_bogus_condwait$(EXEEXT) tc24_nonzero_sem$(EXEEXT) \ + $(am__EXEEXT_1) +am__append_1 = bar_bad bar_trivial +subdir = helgrind/tests +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__EXEEXT_1 = bar_bad$(EXEEXT) \ + bar_trivial$(EXEEXT) +bar_bad_SOURCES = bar_bad.c +bar_bad_OBJECTS = bar_bad.$(OBJEXT) +bar_bad_LDADD = $(LDADD) +bar_bad_DEPENDENCIES = +bar_trivial_SOURCES = bar_trivial.c +bar_trivial_OBJECTS = bar_trivial.$(OBJEXT) +bar_trivial_LDADD = $(LDADD) +bar_trivial_DEPENDENCIES = +hg01_all_ok_SOURCES = hg01_all_ok.c +hg01_all_ok_OBJECTS = hg01_all_ok.$(OBJEXT) +hg01_all_ok_LDADD = $(LDADD) +hg01_all_ok_DEPENDENCIES = +hg02_deadlock_SOURCES = hg02_deadlock.c +hg02_deadlock_OBJECTS = hg02_deadlock.$(OBJEXT) +hg02_deadlock_LDADD = $(LDADD) +hg02_deadlock_DEPENDENCIES = +hg03_inherit_SOURCES = hg03_inherit.c +hg03_inherit_OBJECTS = hg03_inherit.$(OBJEXT) +hg03_inherit_LDADD = $(LDADD) +hg03_inherit_DEPENDENCIES = +hg04_race_SOURCES = hg04_race.c +hg04_race_OBJECTS = hg04_race.$(OBJEXT) +hg04_race_LDADD = $(LDADD) +hg04_race_DEPENDENCIES = +hg05_race2_SOURCES = hg05_race2.c +hg05_race2_OBJECTS = hg05_race2.$(OBJEXT) +hg05_race2_LDADD = $(LDADD) +hg05_race2_DEPENDENCIES = +hg06_readshared_SOURCES = hg06_readshared.c +hg06_readshared_OBJECTS = hg06_readshared.$(OBJEXT) +hg06_readshared_LDADD = $(LDADD) +hg06_readshared_DEPENDENCIES = +tc01_simple_race_SOURCES = tc01_simple_race.c +tc01_simple_race_OBJECTS = tc01_simple_race.$(OBJEXT) +tc01_simple_race_LDADD = $(LDADD) +tc01_simple_race_DEPENDENCIES = +tc02_simple_tls_SOURCES = tc02_simple_tls.c +tc02_simple_tls_OBJECTS = tc02_simple_tls.$(OBJEXT) +tc02_simple_tls_LDADD = $(LDADD) +tc02_simple_tls_DEPENDENCIES = +tc03_re_excl_SOURCES = tc03_re_excl.c +tc03_re_excl_OBJECTS = tc03_re_excl.$(OBJEXT) +tc03_re_excl_LDADD = $(LDADD) +tc03_re_excl_DEPENDENCIES = +tc04_free_lock_SOURCES = tc04_free_lock.c +tc04_free_lock_OBJECTS = tc04_free_lock.$(OBJEXT) +tc04_free_lock_LDADD = $(LDADD) +tc04_free_lock_DEPENDENCIES = +tc05_simple_race_SOURCES = tc05_simple_race.c +tc05_simple_race_OBJECTS = tc05_simple_race.$(OBJEXT) +tc05_simple_race_LDADD = $(LDADD) +tc05_simple_race_DEPENDENCIES = +tc06_two_races_SOURCES = tc06_two_races.c +tc06_two_races_OBJECTS = tc06_two_races.$(OBJEXT) +tc06_two_races_LDADD = $(LDADD) +tc06_two_races_DEPENDENCIES = +tc07_hbl1_SOURCES = tc07_hbl1.c +tc07_hbl1_OBJECTS = tc07_hbl1.$(OBJEXT) +tc07_hbl1_LDADD = $(LDADD) +tc07_hbl1_DEPENDENCIES = +tc08_hbl2_SOURCES = tc08_hbl2.c +tc08_hbl2_OBJECTS = tc08_hbl2.$(OBJEXT) +tc08_hbl2_LDADD = $(LDADD) +tc08_hbl2_DEPENDENCIES = +tc09_bad_unlock_SOURCES = tc09_bad_unlock.c +tc09_bad_unlock_OBJECTS = tc09_bad_unlock.$(OBJEXT) +tc09_bad_unlock_LDADD = $(LDADD) +tc09_bad_unlock_DEPENDENCIES = +tc10_rec_lock_SOURCES = tc10_rec_lock.c +tc10_rec_lock_OBJECTS = tc10_rec_lock.$(OBJEXT) +tc10_rec_lock_LDADD = $(LDADD) +tc10_rec_lock_DEPENDENCIES = +tc11_XCHG_SOURCES = tc11_XCHG.c +tc11_XCHG_OBJECTS = tc11_XCHG.$(OBJEXT) +tc11_XCHG_LDADD = $(LDADD) +tc11_XCHG_DEPENDENCIES = +tc12_rwl_trivial_SOURCES = tc12_rwl_trivial.c +tc12_rwl_trivial_OBJECTS = tc12_rwl_trivial.$(OBJEXT) +tc12_rwl_trivial_LDADD = $(LDADD) +tc12_rwl_trivial_DEPENDENCIES = +tc13_laog1_SOURCES = tc13_laog1.c +tc13_laog1_OBJECTS = tc13_laog1.$(OBJEXT) +tc13_laog1_LDADD = $(LDADD) +tc13_laog1_DEPENDENCIES = +tc14_laog_dinphils_SOURCES = tc14_laog_dinphils.c +tc14_laog_dinphils_OBJECTS = tc14_laog_dinphils.$(OBJEXT) +tc14_laog_dinphils_LDADD = $(LDADD) +tc14_laog_dinphils_DEPENDENCIES = +tc15_laog_lockdel_SOURCES = tc15_laog_lockdel.c +tc15_laog_lockdel_OBJECTS = tc15_laog_lockdel.$(OBJEXT) +tc15_laog_lockdel_LDADD = $(LDADD) +tc15_laog_lockdel_DEPENDENCIES = +tc16_byterace_SOURCES = tc16_byterace.c +tc16_byterace_OBJECTS = tc16_byterace.$(OBJEXT) +tc16_byterace_LDADD = $(LDADD) +tc16_byterace_DEPENDENCIES = +tc17_sembar_SOURCES = tc17_sembar.c +tc17_sembar_OBJECTS = tc17_sembar.$(OBJEXT) +tc17_sembar_LDADD = $(LDADD) +tc17_sembar_DEPENDENCIES = +tc18_semabuse_SOURCES = tc18_semabuse.c +tc18_semabuse_OBJECTS = tc18_semabuse.$(OBJEXT) +tc18_semabuse_LDADD = $(LDADD) +tc18_semabuse_DEPENDENCIES = +tc19_shadowmem_SOURCES = tc19_shadowmem.c +tc19_shadowmem_OBJECTS = tc19_shadowmem.$(OBJEXT) +tc19_shadowmem_LDADD = $(LDADD) +tc19_shadowmem_DEPENDENCIES = +tc20_verifywrap_SOURCES = tc20_verifywrap.c +tc20_verifywrap_OBJECTS = tc20_verifywrap.$(OBJEXT) +tc20_verifywrap_LDADD = $(LDADD) +tc20_verifywrap_DEPENDENCIES = +tc21_pthonce_SOURCES = tc21_pthonce.c +tc21_pthonce_OBJECTS = tc21_pthonce.$(OBJEXT) +tc21_pthonce_LDADD = $(LDADD) +tc21_pthonce_DEPENDENCIES = +tc22_exit_w_lock_SOURCES = tc22_exit_w_lock.c +tc22_exit_w_lock_OBJECTS = tc22_exit_w_lock.$(OBJEXT) +tc22_exit_w_lock_LDADD = $(LDADD) +tc22_exit_w_lock_DEPENDENCIES = +tc23_bogus_condwait_SOURCES = tc23_bogus_condwait.c +tc23_bogus_condwait_OBJECTS = tc23_bogus_condwait.$(OBJEXT) +tc23_bogus_condwait_LDADD = $(LDADD) +tc23_bogus_condwait_DEPENDENCIES = +tc24_nonzero_sem_SOURCES = tc24_nonzero_sem.c +tc24_nonzero_sem_OBJECTS = tc24_nonzero_sem.$(OBJEXT) +tc24_nonzero_sem_LDADD = $(LDADD) +tc24_nonzero_sem_DEPENDENCIES = +SCRIPTS = $(noinst_SCRIPTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = bar_bad.c bar_trivial.c hg01_all_ok.c hg02_deadlock.c \ + hg03_inherit.c hg04_race.c hg05_race2.c hg06_readshared.c \ + tc01_simple_race.c tc02_simple_tls.c tc03_re_excl.c \ + tc04_free_lock.c tc05_simple_race.c tc06_two_races.c \ + tc07_hbl1.c tc08_hbl2.c tc09_bad_unlock.c tc10_rec_lock.c \ + tc11_XCHG.c tc12_rwl_trivial.c tc13_laog1.c \ + tc14_laog_dinphils.c tc15_laog_lockdel.c tc16_byterace.c \ + tc17_sembar.c tc18_semabuse.c tc19_shadowmem.c \ + tc20_verifywrap.c tc21_pthonce.c tc22_exit_w_lock.c \ + tc23_bogus_condwait.c tc24_nonzero_sem.c +DIST_SOURCES = bar_bad.c bar_trivial.c hg01_all_ok.c hg02_deadlock.c \ + hg03_inherit.c hg04_race.c hg05_race2.c hg06_readshared.c \ + tc01_simple_race.c tc02_simple_tls.c tc03_re_excl.c \ + tc04_free_lock.c tc05_simple_race.c tc06_two_races.c \ + tc07_hbl1.c tc08_hbl2.c tc09_bad_unlock.c tc10_rec_lock.c \ + tc11_XCHG.c tc12_rwl_trivial.c tc13_laog1.c \ + tc14_laog_dinphils.c tc15_laog_lockdel.c tc16_byterace.c \ + tc17_sembar.c tc18_semabuse.c tc19_shadowmem.c \ + tc20_verifywrap.c tc21_pthonce.c tc22_exit_w_lock.c \ + tc23_bogus_condwait.c tc24_nonzero_sem.c +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/steph/compile/valgrind/missing --run aclocal-1.10 +AMTAR = ${SHELL} /home/steph/compile/valgrind/missing --run tar +AR = /usr/bin/ar +AUTOCONF = ${SHELL} /home/steph/compile/valgrind/missing --run autoconf +AUTOHEADER = ${SHELL} /home/steph/compile/valgrind/missing --run autoheader +AUTOMAKE = ${SHELL} /home/steph/compile/valgrind/missing --run automake-1.10 +AWK = gawk +BOOST_CFLAGS = +BOOST_LIBS = -lboost_thread-mt -m64 +CC = gcc +CCAS = gcc +CCASDEPMODE = depmode=gcc3 +CCASFLAGS = -Wno-long-long +CCDEPMODE = depmode=gcc3 +CFLAGS = -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector +CPP = gcc -E +CPPFLAGS = +CXX = g++ +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DEFAULT_SUPP = exp-ptrcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DIFF = diff -u +DISTCHECK_CONFIGURE_FLAGS = --with-vex=$(top_srcdir)/VEX +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +FLAG_FNO_STACK_PROTECTOR = -fno-stack-protector +FLAG_M32 = -m32 +FLAG_M64 = -m64 +FLAG_MAIX32 = +FLAG_MAIX64 = +FLAG_MMMX = -mmmx +FLAG_MSSE = -msse +FLAG_UNLIMITED_INLINE_UNIT_GROWTH = --param inline-unit-growth=900 +FLAG_WDECL_AFTER_STMT = -Wdeclaration-after-statement +FLAG_W_EXTRA = -Wextra +FLAG_W_NO_FORMAT_ZERO_LENGTH = -Wno-format-zero-length +GDB = /usr/bin/gdb +GLIBC_VERSION = 2.8 +GREP = /bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LDFLAGS = +LIBOBJS = +LIBS = +LN_S = ln -s +LTLIBOBJS = +MAINT = # +MAKEINFO = ${SHELL} /home/steph/compile/valgrind/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +MPI_CC = mpicc +OBJEXT = o +PACKAGE = valgrind +PACKAGE_BUGREPORT = valgrind-users@lists.sourceforge.net +PACKAGE_NAME = Valgrind +PACKAGE_STRING = Valgrind 3.5.0.SVN +PACKAGE_TARNAME = valgrind +PACKAGE_VERSION = 3.5.0.SVN +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PKG_CONFIG = /usr/bin/pkg-config +PREFERRED_STACK_BOUNDARY = +QTCORE_CFLAGS = -DQT_SHARED -I/usr/include/QtCore +QTCORE_LIBS = -lQtCore +RANLIB = ranlib +SET_MAKE = +SHELL = /bin/sh +STRIP = +VALT_LOAD_ADDRESS = 0x38000000 +VERSION = 3.5.0.SVN +VEX_DIR = $(top_srcdir)/VEX +VGCONF_ARCH_PRI = amd64 +VGCONF_OS = linux +VGCONF_PLATFORM_PRI_CAPS = AMD64_LINUX +VGCONF_PLATFORM_SEC_CAPS = +abs_builddir = /home/steph/compile/valgrind/helgrind/tests +abs_srcdir = /home/steph/compile/valgrind/helgrind/tests +abs_top_builddir = /home/steph/compile/valgrind +abs_top_srcdir = /home/steph/compile/valgrind +ac_ct_CC = gcc +ac_ct_CXX = g++ +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /home/steph/compile/valgrind/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_builddir = ../.. +top_srcdir = ../.. + +# Baseline flags for all compilations. Aim here is to maximise +# performance and get whatever useful warnings we can out of gcc. +AM_CFLAGS_BASE = -O2 -g -Wmissing-prototypes -Wall -Wshadow \ + -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations \ + -Wno-format-zero-length \ + -fno-strict-aliasing + + +# These flags are used for building the preload shared objects. +# The aim is to give reasonable performance but also to have good +# stack traces, since users often see stack traces extending +# into (and through) the preloads. +AM_CFLAGS_PIC = -O -g -fpic -fno-omit-frame-pointer -fno-strict-aliasing + +# Flags for specific targets. +# +# Nb: the AM_CPPFLAGS_* values are suitable for building tools and auxprogs. +# For building the core, coregrind/Makefile.am files add some extra things. +# +# Also: in newer versions of automake (1.10 onwards?) asm files ending with +# '.S' are considered "pre-processed" (as opposed to those ending in '.s') +# and so the CPPFLAGS are passed to the assembler. But this is not true for +# older automakes (e.g. 1.8.5, 1.9.6), sigh. So we include +# AM_CPPFLAGS_<PLATFORM> in each AM_CCASFLAGS_<PLATFORM> variable. This +# means some of the flags are duplicated on systems with newer versions of +# automake, but this does not really matter and seems hard to avoid. +AM_CPPFLAGS_COMMON = \ + -I$(top_srcdir) \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/VEX/pub + +AM_FLAG_M3264_X86_LINUX = -m32 +AM_CPPFLAGS_X86_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_x86=1 \ + -DVGO_linux=1 \ + -DVGP_x86_linux=1 + +AM_CFLAGS_X86_LINUX = -m32 \ + $(AM_CFLAGS_BASE) + +AM_CCASFLAGS_X86_LINUX = $(AM_CPPFLAGS_X86_LINUX) -m32 -g +AM_FLAG_M3264_AMD64_LINUX = -m64 +AM_CPPFLAGS_AMD64_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_amd64=1 \ + -DVGO_linux=1 \ + -DVGP_amd64_linux=1 + +AM_CFLAGS_AMD64_LINUX = -m64 -fomit-frame-pointer \ + $(AM_CFLAGS_BASE) + +AM_CCASFLAGS_AMD64_LINUX = $(AM_CPPFLAGS_AMD64_LINUX) -m64 -g +AM_FLAG_M3264_PPC32_LINUX = -m32 +AM_CPPFLAGS_PPC32_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc32=1 \ + -DVGO_linux=1 \ + -DVGP_ppc32_linux=1 + +AM_CFLAGS_PPC32_LINUX = -m32 $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC32_LINUX = $(AM_CPPFLAGS_PPC32_LINUX) -m32 -g +AM_FLAG_M3264_PPC64_LINUX = -m64 +AM_CPPFLAGS_PPC64_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc64=1 \ + -DVGO_linux=1 \ + -DVGP_ppc64_linux=1 + +AM_CFLAGS_PPC64_LINUX = -m64 $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC64_LINUX = $(AM_CPPFLAGS_PPC64_LINUX) -m64 -g +AM_FLAG_M3264_PPC32_AIX5 = +AM_CPPFLAGS_PPC32_AIX5 = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc32=1 \ + -DVGO_aix5=1 \ + -DVGP_ppc32_aix5=1 + +AM_CFLAGS_PPC32_AIX5 = -mcpu=powerpc $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC32_AIX5 = $(AM_CPPFLAGS_PPC32_AIX5) \ + -mcpu=powerpc -g + +AM_FLAG_M3264_PPC64_AIX5 = +AM_CPPFLAGS_PPC64_AIX5 = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc64=1 \ + -DVGO_aix5=1 \ + -DVGP_ppc64_aix5=1 + +AM_CFLAGS_PPC64_AIX5 = -mcpu=powerpc64 $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC64_AIX5 = $(AM_CPPFLAGS_PPC64_AIX5) \ + -mcpu=powerpc64 -g + + +# Flags for the primary target. These must be used to build the +# regtests and performance tests. In fact, these must be used to +# build anything which is built only once on a dual-arch build. +# +AM_FLAG_M3264_PRI = $(AM_FLAG_M3264_AMD64_LINUX) +AM_CPPFLAGS_PRI = $(AM_CPPFLAGS_AMD64_LINUX) +AM_CFLAGS_PRI = $(AM_CFLAGS_AMD64_LINUX) +AM_CCASFLAGS_PRI = $(AM_CCASFLAGS_AMD64_LINUX) +AM_FLAG_M3264_SEC = +#AM_FLAG_M3264_SEC = $(AM_FLAG_M3264_) + +# Baseline link flags for making dynamic shared objects. +# +PRELOAD_LDFLAGS_COMMON_LINUX = -nodefaultlibs -shared -Wl,-z,interpose,-z,initfirst +PRELOAD_LDFLAGS_COMMON_AIX5 = -nodefaultlibs -shared -Wl,-G -Wl,-bnogc +PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) -m32 +PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) -m64 +PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) -m32 +PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) -m64 +PRELOAD_LDFLAGS_PPC32_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) +PRELOAD_LDFLAGS_PPC64_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \ + -I$(top_srcdir)/coregrind -I$(top_builddir)/include \ + -I$(top_srcdir)/VEX/pub \ + -DVGA_$(VGCONF_ARCH_PRI)=1 \ + -DVGO_$(VGCONF_OS)=1 \ + -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1 + +# Nb: Tools need to augment these flags with an arch-selection option, such +# as $(AM_FLAG_M3264_PRI). +AM_CFLAGS = -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS = -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI) +# Include AM_CPPFLAGS in AM_CCASFLAGS to allow for older versions of +# automake; see comments in Makefile.flags.am for more detail. +AM_CCASFLAGS = $(AM_CPPFLAGS) +noinst_SCRIPTS = filter_stderr +EXTRA_DIST = $(noinst_SCRIPTS) \ + bar_bad.vgtest bar_bad.stdout.exp bar_bad.stderr.exp \ + bar_trivial.vgtest bar_trivial.stdout.exp bar_trivial.stderr.exp \ + hg01_all_ok.vgtest hg01_all_ok.stdout.exp hg01_all_ok.stderr.exp \ + hg02_deadlock.vgtest hg02_deadlock.stdout.exp hg02_deadlock.stderr.exp \ + hg03_inherit.vgtest hg03_inherit.stdout.exp hg03_inherit.stderr.exp \ + hg04_race.vgtest hg04_race.stdout.exp hg04_race.stderr.exp \ + hg05_race2.vgtest hg05_race2.stdout.exp hg05_race2.stderr.exp \ + hg06_readshared.vgtest hg06_readshared.stdout.exp \ + hg06_readshared.stderr.exp \ + pth_barrier1.vgtest pth_barrier1.stdout.exp pth_barrier1.stderr.exp \ + pth_barrier2.vgtest pth_barrier2.stdout.exp pth_barrier2.stderr.exp \ + pth_barrier3.vgtest pth_barrier3.stdout.exp pth_barrier3.stderr.exp \ + rwlock_race.vgtest rwlock_race.stdout.exp rwlock_race.stderr.exp \ + rwlock_test.vgtest rwlock_test.stdout.exp rwlock_test.stderr.exp \ + tc01_simple_race.vgtest tc01_simple_race.stdout.exp \ + tc01_simple_race.stderr.exp \ + tc02_simple_tls.vgtest tc02_simple_tls.stdout.exp \ + tc02_simple_tls.stderr.exp \ + tc03_re_excl.vgtest tc03_re_excl.stdout.exp \ + tc03_re_excl.stderr.exp \ + tc04_free_lock.vgtest tc04_free_lock.stdout.exp \ + tc04_free_lock.stderr.exp \ + tc05_simple_race.vgtest tc05_simple_race.stdout.exp \ + tc05_simple_race.stderr.exp \ + tc06_two_races.vgtest tc06_two_races.stdout.exp \ + tc06_two_races.stderr.exp \ + tc07_hbl1.vgtest tc07_hbl1.stdout.exp tc07_hbl1.stderr.exp \ + tc08_hbl2.vgtest tc08_hbl2.stdout.exp tc08_hbl2.stderr.exp \ + tc09_bad_unlock.vgtest tc09_bad_unlock.stdout.exp \ + tc09_bad_unlock.stderr.exp-glibc23-amd64 \ + tc09_bad_unlock.stderr.exp-glibc25-amd64 \ + tc09_bad_unlock.stderr.exp-glibc25-x86 \ + tc10_rec_lock.vgtest tc10_rec_lock.stdout.exp tc10_rec_lock.stderr.exp \ + tc11_XCHG.vgtest tc11_XCHG.stdout.exp tc11_XCHG.stderr.exp \ + tc12_rwl_trivial.vgtest tc12_rwl_trivial.stdout.exp \ + tc12_rwl_trivial.stderr.exp \ + tc13_laog1.vgtest tc13_laog1.stdout.exp tc13_laog1.stderr.exp \ + tc14_laog_dinphils.vgtest tc14_laog_dinphils.stdout.exp \ + tc14_laog_dinphils.stderr.exp \ + tc15_laog_lockdel.vgtest tc15_laog_lockdel.stdout.exp \ + tc15_laog_lockdel.stderr.exp \ + tc16_byterace.vgtest tc16_byterace.stdout.exp \ + tc16_byterace.stderr.exp \ + tc17_sembar.vgtest tc17_sembar.stdout.exp \ + tc17_sembar.stderr.exp \ + tc18_semabuse.vgtest tc18_semabuse.stdout.exp \ + tc18_semabuse.stderr.exp-glibc25-amd64 \ + tc18_semabuse.stderr.exp-glibc28-amd64 \ + tc19_shadowmem.vgtest tc19_shadowmem.stdout.exp \ + tc19_shadowmem.stderr.exp \ + tc20_verifywrap.vgtest tc20_verifywrap.stdout.exp \ + tc20_verifywrap.stderr.exp-glibc25-amd64 \ + tc20_verifywrap.stderr.exp-glibc27-amd64 \ + tc21_pthonce.vgtest tc21_pthonce.stdout.exp tc21_pthonce.stderr.exp \ + tc22_exit_w_lock.vgtest tc22_exit_w_lock.stdout.exp \ + tc22_exit_w_lock.stderr.exp \ + tc23_bogus_condwait.vgtest tc23_bogus_condwait.stdout.exp \ + tc23_bogus_condwait.stderr.exp \ + tc24_nonzero_sem.vgtest tc24_nonzero_sem.stdout.exp \ + tc24_nonzero_sem.stderr.exp + +LDADD = -lpthread +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/Makefile.tool-tests.am $(top_srcdir)/Makefile.flags.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign helgrind/tests/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign helgrind/tests/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) +bar_bad$(EXEEXT): $(bar_bad_OBJECTS) $(bar_bad_DEPENDENCIES) + @rm -f bar_bad$(EXEEXT) + $(LINK) $(bar_bad_OBJECTS) $(bar_bad_LDADD) $(LIBS) +bar_trivial$(EXEEXT): $(bar_trivial_OBJECTS) $(bar_trivial_DEPENDENCIES) + @rm -f bar_trivial$(EXEEXT) + $(LINK) $(bar_trivial_OBJECTS) $(bar_trivial_LDADD) $(LIBS) +hg01_all_ok$(EXEEXT): $(hg01_all_ok_OBJECTS) $(hg01_all_ok_DEPENDENCIES) + @rm -f hg01_all_ok$(EXEEXT) + $(LINK) $(hg01_all_ok_OBJECTS) $(hg01_all_ok_LDADD) $(LIBS) +hg02_deadlock$(EXEEXT): $(hg02_deadlock_OBJECTS) $(hg02_deadlock_DEPENDENCIES) + @rm -f hg02_deadlock$(EXEEXT) + $(LINK) $(hg02_deadlock_OBJECTS) $(hg02_deadlock_LDADD) $(LIBS) +hg03_inherit$(EXEEXT): $(hg03_inherit_OBJECTS) $(hg03_inherit_DEPENDENCIES) + @rm -f hg03_inherit$(EXEEXT) + $(LINK) $(hg03_inherit_OBJECTS) $(hg03_inherit_LDADD) $(LIBS) +hg04_race$(EXEEXT): $(hg04_race_OBJECTS) $(hg04_race_DEPENDENCIES) + @rm -f hg04_race$(EXEEXT) + $(LINK) $(hg04_race_OBJECTS) $(hg04_race_LDADD) $(LIBS) +hg05_race2$(EXEEXT): $(hg05_race2_OBJECTS) $(hg05_race2_DEPENDENCIES) + @rm -f hg05_race2$(EXEEXT) + $(LINK) $(hg05_race2_OBJECTS) $(hg05_race2_LDADD) $(LIBS) +hg06_readshared$(EXEEXT): $(hg06_readshared_OBJECTS) $(hg06_readshared_DEPENDENCIES) + @rm -f hg06_readshared$(EXEEXT) + $(LINK) $(hg06_readshared_OBJECTS) $(hg06_readshared_LDADD) $(LIBS) +tc01_simple_race$(EXEEXT): $(tc01_simple_race_OBJECTS) $(tc01_simple_race_DEPENDENCIES) + @rm -f tc01_simple_race$(EXEEXT) + $(LINK) $(tc01_simple_race_OBJECTS) $(tc01_simple_race_LDADD) $(LIBS) +tc02_simple_tls$(EXEEXT): $(tc02_simple_tls_OBJECTS) $(tc02_simple_tls_DEPENDENCIES) + @rm -f tc02_simple_tls$(EXEEXT) + $(LINK) $(tc02_simple_tls_OBJECTS) $(tc02_simple_tls_LDADD) $(LIBS) +tc03_re_excl$(EXEEXT): $(tc03_re_excl_OBJECTS) $(tc03_re_excl_DEPENDENCIES) + @rm -f tc03_re_excl$(EXEEXT) + $(LINK) $(tc03_re_excl_OBJECTS) $(tc03_re_excl_LDADD) $(LIBS) +tc04_free_lock$(EXEEXT): $(tc04_free_lock_OBJECTS) $(tc04_free_lock_DEPENDENCIES) + @rm -f tc04_free_lock$(EXEEXT) + $(LINK) $(tc04_free_lock_OBJECTS) $(tc04_free_lock_LDADD) $(LIBS) +tc05_simple_race$(EXEEXT): $(tc05_simple_race_OBJECTS) $(tc05_simple_race_DEPENDENCIES) + @rm -f tc05_simple_race$(EXEEXT) + $(LINK) $(tc05_simple_race_OBJECTS) $(tc05_simple_race_LDADD) $(LIBS) +tc06_two_races$(EXEEXT): $(tc06_two_races_OBJECTS) $(tc06_two_races_DEPENDENCIES) + @rm -f tc06_two_races$(EXEEXT) + $(LINK) $(tc06_two_races_OBJECTS) $(tc06_two_races_LDADD) $(LIBS) +tc07_hbl1$(EXEEXT): $(tc07_hbl1_OBJECTS) $(tc07_hbl1_DEPENDENCIES) + @rm -f tc07_hbl1$(EXEEXT) + $(LINK) $(tc07_hbl1_OBJECTS) $(tc07_hbl1_LDADD) $(LIBS) +tc08_hbl2$(EXEEXT): $(tc08_hbl2_OBJECTS) $(tc08_hbl2_DEPENDENCIES) + @rm -f tc08_hbl2$(EXEEXT) + $(LINK) $(tc08_hbl2_OBJECTS) $(tc08_hbl2_LDADD) $(LIBS) +tc09_bad_unlock$(EXEEXT): $(tc09_bad_unlock_OBJECTS) $(tc09_bad_unlock_DEPENDENCIES) + @rm -f tc09_bad_unlock$(EXEEXT) + $(LINK) $(tc09_bad_unlock_OBJECTS) $(tc09_bad_unlock_LDADD) $(LIBS) +tc10_rec_lock$(EXEEXT): $(tc10_rec_lock_OBJECTS) $(tc10_rec_lock_DEPENDENCIES) + @rm -f tc10_rec_lock$(EXEEXT) + $(LINK) $(tc10_rec_lock_OBJECTS) $(tc10_rec_lock_LDADD) $(LIBS) +tc11_XCHG$(EXEEXT): $(tc11_XCHG_OBJECTS) $(tc11_XCHG_DEPENDENCIES) + @rm -f tc11_XCHG$(EXEEXT) + $(LINK) $(tc11_XCHG_OBJECTS) $(tc11_XCHG_LDADD) $(LIBS) +tc12_rwl_trivial$(EXEEXT): $(tc12_rwl_trivial_OBJECTS) $(tc12_rwl_trivial_DEPENDENCIES) + @rm -f tc12_rwl_trivial$(EXEEXT) + $(LINK) $(tc12_rwl_trivial_OBJECTS) $(tc12_rwl_trivial_LDADD) $(LIBS) +tc13_laog1$(EXEEXT): $(tc13_laog1_OBJECTS) $(tc13_laog1_DEPENDENCIES) + @rm -f tc13_laog1$(EXEEXT) + $(LINK) $(tc13_laog1_OBJECTS) $(tc13_laog1_LDADD) $(LIBS) +tc14_laog_dinphils$(EXEEXT): $(tc14_laog_dinphils_OBJECTS) $(tc14_laog_dinphils_DEPENDENCIES) + @rm -f tc14_laog_dinphils$(EXEEXT) + $(LINK) $(tc14_laog_dinphils_OBJECTS) $(tc14_laog_dinphils_LDADD) $(LIBS) +tc15_laog_lockdel$(EXEEXT): $(tc15_laog_lockdel_OBJECTS) $(tc15_laog_lockdel_DEPENDENCIES) + @rm -f tc15_laog_lockdel$(EXEEXT) + $(LINK) $(tc15_laog_lockdel_OBJECTS) $(tc15_laog_lockdel_LDADD) $(LIBS) +tc16_byterace$(EXEEXT): $(tc16_byterace_OBJECTS) $(tc16_byterace_DEPENDENCIES) + @rm -f tc16_byterace$(EXEEXT) + $(LINK) $(tc16_byterace_OBJECTS) $(tc16_byterace_LDADD) $(LIBS) +tc17_sembar$(EXEEXT): $(tc17_sembar_OBJECTS) $(tc17_sembar_DEPENDENCIES) + @rm -f tc17_sembar$(EXEEXT) + $(LINK) $(tc17_sembar_OBJECTS) $(tc17_sembar_LDADD) $(LIBS) +tc18_semabuse$(EXEEXT): $(tc18_semabuse_OBJECTS) $(tc18_semabuse_DEPENDENCIES) + @rm -f tc18_semabuse$(EXEEXT) + $(LINK) $(tc18_semabuse_OBJECTS) $(tc18_semabuse_LDADD) $(LIBS) +tc19_shadowmem$(EXEEXT): $(tc19_shadowmem_OBJECTS) $(tc19_shadowmem_DEPENDENCIES) + @rm -f tc19_shadowmem$(EXEEXT) + $(LINK) $(tc19_shadowmem_OBJECTS) $(tc19_shadowmem_LDADD) $(LIBS) +tc20_verifywrap$(EXEEXT): $(tc20_verifywrap_OBJECTS) $(tc20_verifywrap_DEPENDENCIES) + @rm -f tc20_verifywrap$(EXEEXT) + $(LINK) $(tc20_verifywrap_OBJECTS) $(tc20_verifywrap_LDADD) $(LIBS) +tc21_pthonce$(EXEEXT): $(tc21_pthonce_OBJECTS) $(tc21_pthonce_DEPENDENCIES) + @rm -f tc21_pthonce$(EXEEXT) + $(LINK) $(tc21_pthonce_OBJECTS) $(tc21_pthonce_LDADD) $(LIBS) +tc22_exit_w_lock$(EXEEXT): $(tc22_exit_w_lock_OBJECTS) $(tc22_exit_w_lock_DEPENDENCIES) + @rm -f tc22_exit_w_lock$(EXEEXT) + $(LINK) $(tc22_exit_w_lock_OBJECTS) $(tc22_exit_w_lock_LDADD) $(LIBS) +tc23_bogus_condwait$(EXEEXT): $(tc23_bogus_condwait_OBJECTS) $(tc23_bogus_condwait_DEPENDENCIES) + @rm -f tc23_bogus_condwait$(EXEEXT) + $(LINK) $(tc23_bogus_condwait_OBJECTS) $(tc23_bogus_condwait_LDADD) $(LIBS) +tc24_nonzero_sem$(EXEEXT): $(tc24_nonzero_sem_OBJECTS) $(tc24_nonzero_sem_DEPENDENCIES) + @rm -f tc24_nonzero_sem$(EXEEXT) + $(LINK) $(tc24_nonzero_sem_OBJECTS) $(tc24_nonzero_sem_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/bar_bad.Po +include ./$(DEPDIR)/bar_trivial.Po +include ./$(DEPDIR)/hg01_all_ok.Po +include ./$(DEPDIR)/hg02_deadlock.Po +include ./$(DEPDIR)/hg03_inherit.Po +include ./$(DEPDIR)/hg04_race.Po +include ./$(DEPDIR)/hg05_race2.Po +include ./$(DEPDIR)/hg06_readshared.Po +include ./$(DEPDIR)/tc01_simple_race.Po +include ./$(DEPDIR)/tc02_simple_tls.Po +include ./$(DEPDIR)/tc03_re_excl.Po +include ./$(DEPDIR)/tc04_free_lock.Po +include ./$(DEPDIR)/tc05_simple_race.Po +include ./$(DEPDIR)/tc06_two_races.Po +include ./$(DEPDIR)/tc07_hbl1.Po +include ./$(DEPDIR)/tc08_hbl2.Po +include ./$(DEPDIR)/tc09_bad_unlock.Po +include ./$(DEPDIR)/tc10_rec_lock.Po +include ./$(DEPDIR)/tc11_XCHG.Po +include ./$(DEPDIR)/tc12_rwl_trivial.Po +include ./$(DEPDIR)/tc13_laog1.Po +include ./$(DEPDIR)/tc14_laog_dinphils.Po +include ./$(DEPDIR)/tc15_laog_lockdel.Po +include ./$(DEPDIR)/tc16_byterace.Po +include ./$(DEPDIR)/tc17_sembar.Po +include ./$(DEPDIR)/tc18_semabuse.Po +include ./$(DEPDIR)/tc19_shadowmem.Po +include ./$(DEPDIR)/tc20_verifywrap.Po +include ./$(DEPDIR)/tc21_pthonce.Po +include ./$(DEPDIR)/tc22_exit_w_lock.Po +include ./$(DEPDIR)/tc23_bogus_condwait.Po +include ./$(DEPDIR)/tc24_nonzero_sem.Po + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) +check: check-am +all-am: Makefile $(SCRIPTS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-checkPROGRAMS clean-generic ctags distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am new file mode 100644 index 0000000..f52072f --- /dev/null +++ b/helgrind/tests/Makefile.am @@ -0,0 +1,108 @@ + +include $(top_srcdir)/Makefile.tool-tests.am + +noinst_SCRIPTS = filter_stderr + +EXTRA_DIST = $(noinst_SCRIPTS) \ + bar_bad.vgtest bar_bad.stdout.exp bar_bad.stderr.exp \ + bar_trivial.vgtest bar_trivial.stdout.exp bar_trivial.stderr.exp \ + hg01_all_ok.vgtest hg01_all_ok.stdout.exp hg01_all_ok.stderr.exp \ + hg02_deadlock.vgtest hg02_deadlock.stdout.exp hg02_deadlock.stderr.exp \ + hg03_inherit.vgtest hg03_inherit.stdout.exp hg03_inherit.stderr.exp \ + hg04_race.vgtest hg04_race.stdout.exp hg04_race.stderr.exp \ + hg05_race2.vgtest hg05_race2.stdout.exp hg05_race2.stderr.exp \ + hg06_readshared.vgtest hg06_readshared.stdout.exp \ + hg06_readshared.stderr.exp \ + pth_barrier1.vgtest pth_barrier1.stdout.exp pth_barrier1.stderr.exp \ + pth_barrier2.vgtest pth_barrier2.stdout.exp pth_barrier2.stderr.exp \ + pth_barrier3.vgtest pth_barrier3.stdout.exp pth_barrier3.stderr.exp \ + rwlock_race.vgtest rwlock_race.stdout.exp rwlock_race.stderr.exp \ + rwlock_test.vgtest rwlock_test.stdout.exp rwlock_test.stderr.exp \ + tc01_simple_race.vgtest tc01_simple_race.stdout.exp \ + tc01_simple_race.stderr.exp \ + tc02_simple_tls.vgtest tc02_simple_tls.stdout.exp \ + tc02_simple_tls.stderr.exp \ + tc03_re_excl.vgtest tc03_re_excl.stdout.exp \ + tc03_re_excl.stderr.exp \ + tc04_free_lock.vgtest tc04_free_lock.stdout.exp \ + tc04_free_lock.stderr.exp \ + tc05_simple_race.vgtest tc05_simple_race.stdout.exp \ + tc05_simple_race.stderr.exp \ + tc06_two_races.vgtest tc06_two_races.stdout.exp \ + tc06_two_races.stderr.exp \ + tc07_hbl1.vgtest tc07_hbl1.stdout.exp tc07_hbl1.stderr.exp \ + tc08_hbl2.vgtest tc08_hbl2.stdout.exp tc08_hbl2.stderr.exp \ + tc09_bad_unlock.vgtest tc09_bad_unlock.stdout.exp \ + tc09_bad_unlock.stderr.exp-glibc23-amd64 \ + tc09_bad_unlock.stderr.exp-glibc25-amd64 \ + tc09_bad_unlock.stderr.exp-glibc25-x86 \ + tc10_rec_lock.vgtest tc10_rec_lock.stdout.exp tc10_rec_lock.stderr.exp \ + tc11_XCHG.vgtest tc11_XCHG.stdout.exp tc11_XCHG.stderr.exp \ + tc12_rwl_trivial.vgtest tc12_rwl_trivial.stdout.exp \ + tc12_rwl_trivial.stderr.exp \ + tc13_laog1.vgtest tc13_laog1.stdout.exp tc13_laog1.stderr.exp \ + tc14_laog_dinphils.vgtest tc14_laog_dinphils.stdout.exp \ + tc14_laog_dinphils.stderr.exp \ + tc15_laog_lockdel.vgtest tc15_laog_lockdel.stdout.exp \ + tc15_laog_lockdel.stderr.exp \ + tc16_byterace.vgtest tc16_byterace.stdout.exp \ + tc16_byterace.stderr.exp \ + tc17_sembar.vgtest tc17_sembar.stdout.exp \ + tc17_sembar.stderr.exp \ + tc18_semabuse.vgtest tc18_semabuse.stdout.exp \ + tc18_semabuse.stderr.exp-glibc25-amd64 \ + tc18_semabuse.stderr.exp-glibc28-amd64 \ + tc19_shadowmem.vgtest tc19_shadowmem.stdout.exp \ + tc19_shadowmem.stderr.exp \ + tc20_verifywrap.vgtest tc20_verifywrap.stdout.exp \ + tc20_verifywrap.stderr.exp-glibc25-amd64 \ + tc20_verifywrap.stderr.exp-glibc27-amd64 \ + tc21_pthonce.vgtest tc21_pthonce.stdout.exp tc21_pthonce.stderr.exp \ + tc22_exit_w_lock.vgtest tc22_exit_w_lock.stdout.exp \ + tc22_exit_w_lock.stderr.exp \ + tc23_bogus_condwait.vgtest tc23_bogus_condwait.stdout.exp \ + tc23_bogus_condwait.stderr.exp \ + tc24_nonzero_sem.vgtest tc24_nonzero_sem.stdout.exp \ + tc24_nonzero_sem.stderr.exp + +check_PROGRAMS = \ + hg01_all_ok \ + hg02_deadlock \ + hg03_inherit \ + hg04_race \ + hg05_race2 \ + hg06_readshared \ + tc01_simple_race \ + tc02_simple_tls \ + tc03_re_excl \ + tc04_free_lock \ + tc05_simple_race \ + tc06_two_races \ + tc07_hbl1 \ + tc08_hbl2 \ + tc09_bad_unlock \ + tc10_rec_lock \ + tc11_XCHG \ + tc12_rwl_trivial \ + tc13_laog1 \ + tc14_laog_dinphils \ + tc15_laog_lockdel \ + tc16_byterace \ + tc17_sembar \ + tc18_semabuse \ + tc19_shadowmem \ + tc20_verifywrap \ + tc21_pthonce \ + tc22_exit_w_lock \ + tc23_bogus_condwait \ + tc24_nonzero_sem + +if HAVE_PTHREAD_BARRIER +check_PROGRAMS += bar_bad bar_trivial +endif + +AM_CFLAGS += $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) + +LDADD = -lpthread + diff --git a/helgrind/tests/Makefile.in b/helgrind/tests/Makefile.in new file mode 100644 index 0000000..5f90dfa --- /dev/null +++ b/helgrind/tests/Makefile.in @@ -0,0 +1,908 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# This file is used for tool tests, and also in perf/Makefile.am. + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/Makefile.flags.am \ + $(top_srcdir)/Makefile.tool-tests.am +check_PROGRAMS = hg01_all_ok$(EXEEXT) hg02_deadlock$(EXEEXT) \ + hg03_inherit$(EXEEXT) hg04_race$(EXEEXT) hg05_race2$(EXEEXT) \ + hg06_readshared$(EXEEXT) tc01_simple_race$(EXEEXT) \ + tc02_simple_tls$(EXEEXT) tc03_re_excl$(EXEEXT) \ + tc04_free_lock$(EXEEXT) tc05_simple_race$(EXEEXT) \ + tc06_two_races$(EXEEXT) tc07_hbl1$(EXEEXT) tc08_hbl2$(EXEEXT) \ + tc09_bad_unlock$(EXEEXT) tc10_rec_lock$(EXEEXT) \ + tc11_XCHG$(EXEEXT) tc12_rwl_trivial$(EXEEXT) \ + tc13_laog1$(EXEEXT) tc14_laog_dinphils$(EXEEXT) \ + tc15_laog_lockdel$(EXEEXT) tc16_byterace$(EXEEXT) \ + tc17_sembar$(EXEEXT) tc18_semabuse$(EXEEXT) \ + tc19_shadowmem$(EXEEXT) tc20_verifywrap$(EXEEXT) \ + tc21_pthonce$(EXEEXT) tc22_exit_w_lock$(EXEEXT) \ + tc23_bogus_condwait$(EXEEXT) tc24_nonzero_sem$(EXEEXT) \ + $(am__EXEEXT_1) +@HAVE_PTHREAD_BARRIER_TRUE@am__append_1 = bar_bad bar_trivial +subdir = helgrind/tests +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +@HAVE_PTHREAD_BARRIER_TRUE@am__EXEEXT_1 = bar_bad$(EXEEXT) \ +@HAVE_PTHREAD_BARRIER_TRUE@ bar_trivial$(EXEEXT) +bar_bad_SOURCES = bar_bad.c +bar_bad_OBJECTS = bar_bad.$(OBJEXT) +bar_bad_LDADD = $(LDADD) +bar_bad_DEPENDENCIES = +bar_trivial_SOURCES = bar_trivial.c +bar_trivial_OBJECTS = bar_trivial.$(OBJEXT) +bar_trivial_LDADD = $(LDADD) +bar_trivial_DEPENDENCIES = +hg01_all_ok_SOURCES = hg01_all_ok.c +hg01_all_ok_OBJECTS = hg01_all_ok.$(OBJEXT) +hg01_all_ok_LDADD = $(LDADD) +hg01_all_ok_DEPENDENCIES = +hg02_deadlock_SOURCES = hg02_deadlock.c +hg02_deadlock_OBJECTS = hg02_deadlock.$(OBJEXT) +hg02_deadlock_LDADD = $(LDADD) +hg02_deadlock_DEPENDENCIES = +hg03_inherit_SOURCES = hg03_inherit.c +hg03_inherit_OBJECTS = hg03_inherit.$(OBJEXT) +hg03_inherit_LDADD = $(LDADD) +hg03_inherit_DEPENDENCIES = +hg04_race_SOURCES = hg04_race.c +hg04_race_OBJECTS = hg04_race.$(OBJEXT) +hg04_race_LDADD = $(LDADD) +hg04_race_DEPENDENCIES = +hg05_race2_SOURCES = hg05_race2.c +hg05_race2_OBJECTS = hg05_race2.$(OBJEXT) +hg05_race2_LDADD = $(LDADD) +hg05_race2_DEPENDENCIES = +hg06_readshared_SOURCES = hg06_readshared.c +hg06_readshared_OBJECTS = hg06_readshared.$(OBJEXT) +hg06_readshared_LDADD = $(LDADD) +hg06_readshared_DEPENDENCIES = +tc01_simple_race_SOURCES = tc01_simple_race.c +tc01_simple_race_OBJECTS = tc01_simple_race.$(OBJEXT) +tc01_simple_race_LDADD = $(LDADD) +tc01_simple_race_DEPENDENCIES = +tc02_simple_tls_SOURCES = tc02_simple_tls.c +tc02_simple_tls_OBJECTS = tc02_simple_tls.$(OBJEXT) +tc02_simple_tls_LDADD = $(LDADD) +tc02_simple_tls_DEPENDENCIES = +tc03_re_excl_SOURCES = tc03_re_excl.c +tc03_re_excl_OBJECTS = tc03_re_excl.$(OBJEXT) +tc03_re_excl_LDADD = $(LDADD) +tc03_re_excl_DEPENDENCIES = +tc04_free_lock_SOURCES = tc04_free_lock.c +tc04_free_lock_OBJECTS = tc04_free_lock.$(OBJEXT) +tc04_free_lock_LDADD = $(LDADD) +tc04_free_lock_DEPENDENCIES = +tc05_simple_race_SOURCES = tc05_simple_race.c +tc05_simple_race_OBJECTS = tc05_simple_race.$(OBJEXT) +tc05_simple_race_LDADD = $(LDADD) +tc05_simple_race_DEPENDENCIES = +tc06_two_races_SOURCES = tc06_two_races.c +tc06_two_races_OBJECTS = tc06_two_races.$(OBJEXT) +tc06_two_races_LDADD = $(LDADD) +tc06_two_races_DEPENDENCIES = +tc07_hbl1_SOURCES = tc07_hbl1.c +tc07_hbl1_OBJECTS = tc07_hbl1.$(OBJEXT) +tc07_hbl1_LDADD = $(LDADD) +tc07_hbl1_DEPENDENCIES = +tc08_hbl2_SOURCES = tc08_hbl2.c +tc08_hbl2_OBJECTS = tc08_hbl2.$(OBJEXT) +tc08_hbl2_LDADD = $(LDADD) +tc08_hbl2_DEPENDENCIES = +tc09_bad_unlock_SOURCES = tc09_bad_unlock.c +tc09_bad_unlock_OBJECTS = tc09_bad_unlock.$(OBJEXT) +tc09_bad_unlock_LDADD = $(LDADD) +tc09_bad_unlock_DEPENDENCIES = +tc10_rec_lock_SOURCES = tc10_rec_lock.c +tc10_rec_lock_OBJECTS = tc10_rec_lock.$(OBJEXT) +tc10_rec_lock_LDADD = $(LDADD) +tc10_rec_lock_DEPENDENCIES = +tc11_XCHG_SOURCES = tc11_XCHG.c +tc11_XCHG_OBJECTS = tc11_XCHG.$(OBJEXT) +tc11_XCHG_LDADD = $(LDADD) +tc11_XCHG_DEPENDENCIES = +tc12_rwl_trivial_SOURCES = tc12_rwl_trivial.c +tc12_rwl_trivial_OBJECTS = tc12_rwl_trivial.$(OBJEXT) +tc12_rwl_trivial_LDADD = $(LDADD) +tc12_rwl_trivial_DEPENDENCIES = +tc13_laog1_SOURCES = tc13_laog1.c +tc13_laog1_OBJECTS = tc13_laog1.$(OBJEXT) +tc13_laog1_LDADD = $(LDADD) +tc13_laog1_DEPENDENCIES = +tc14_laog_dinphils_SOURCES = tc14_laog_dinphils.c +tc14_laog_dinphils_OBJECTS = tc14_laog_dinphils.$(OBJEXT) +tc14_laog_dinphils_LDADD = $(LDADD) +tc14_laog_dinphils_DEPENDENCIES = +tc15_laog_lockdel_SOURCES = tc15_laog_lockdel.c +tc15_laog_lockdel_OBJECTS = tc15_laog_lockdel.$(OBJEXT) +tc15_laog_lockdel_LDADD = $(LDADD) +tc15_laog_lockdel_DEPENDENCIES = +tc16_byterace_SOURCES = tc16_byterace.c +tc16_byterace_OBJECTS = tc16_byterace.$(OBJEXT) +tc16_byterace_LDADD = $(LDADD) +tc16_byterace_DEPENDENCIES = +tc17_sembar_SOURCES = tc17_sembar.c +tc17_sembar_OBJECTS = tc17_sembar.$(OBJEXT) +tc17_sembar_LDADD = $(LDADD) +tc17_sembar_DEPENDENCIES = +tc18_semabuse_SOURCES = tc18_semabuse.c +tc18_semabuse_OBJECTS = tc18_semabuse.$(OBJEXT) +tc18_semabuse_LDADD = $(LDADD) +tc18_semabuse_DEPENDENCIES = +tc19_shadowmem_SOURCES = tc19_shadowmem.c +tc19_shadowmem_OBJECTS = tc19_shadowmem.$(OBJEXT) +tc19_shadowmem_LDADD = $(LDADD) +tc19_shadowmem_DEPENDENCIES = +tc20_verifywrap_SOURCES = tc20_verifywrap.c +tc20_verifywrap_OBJECTS = tc20_verifywrap.$(OBJEXT) +tc20_verifywrap_LDADD = $(LDADD) +tc20_verifywrap_DEPENDENCIES = +tc21_pthonce_SOURCES = tc21_pthonce.c +tc21_pthonce_OBJECTS = tc21_pthonce.$(OBJEXT) +tc21_pthonce_LDADD = $(LDADD) +tc21_pthonce_DEPENDENCIES = +tc22_exit_w_lock_SOURCES = tc22_exit_w_lock.c +tc22_exit_w_lock_OBJECTS = tc22_exit_w_lock.$(OBJEXT) +tc22_exit_w_lock_LDADD = $(LDADD) +tc22_exit_w_lock_DEPENDENCIES = +tc23_bogus_condwait_SOURCES = tc23_bogus_condwait.c +tc23_bogus_condwait_OBJECTS = tc23_bogus_condwait.$(OBJEXT) +tc23_bogus_condwait_LDADD = $(LDADD) +tc23_bogus_condwait_DEPENDENCIES = +tc24_nonzero_sem_SOURCES = tc24_nonzero_sem.c +tc24_nonzero_sem_OBJECTS = tc24_nonzero_sem.$(OBJEXT) +tc24_nonzero_sem_LDADD = $(LDADD) +tc24_nonzero_sem_DEPENDENCIES = +SCRIPTS = $(noinst_SCRIPTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = bar_bad.c bar_trivial.c hg01_all_ok.c hg02_deadlock.c \ + hg03_inherit.c hg04_race.c hg05_race2.c hg06_readshared.c \ + tc01_simple_race.c tc02_simple_tls.c tc03_re_excl.c \ + tc04_free_lock.c tc05_simple_race.c tc06_two_races.c \ + tc07_hbl1.c tc08_hbl2.c tc09_bad_unlock.c tc10_rec_lock.c \ + tc11_XCHG.c tc12_rwl_trivial.c tc13_laog1.c \ + tc14_laog_dinphils.c tc15_laog_lockdel.c tc16_byterace.c \ + tc17_sembar.c tc18_semabuse.c tc19_shadowmem.c \ + tc20_verifywrap.c tc21_pthonce.c tc22_exit_w_lock.c \ + tc23_bogus_condwait.c tc24_nonzero_sem.c +DIST_SOURCES = bar_bad.c bar_trivial.c hg01_all_ok.c hg02_deadlock.c \ + hg03_inherit.c hg04_race.c hg05_race2.c hg06_readshared.c \ + tc01_simple_race.c tc02_simple_tls.c tc03_re_excl.c \ + tc04_free_lock.c tc05_simple_race.c tc06_two_races.c \ + tc07_hbl1.c tc08_hbl2.c tc09_bad_unlock.c tc10_rec_lock.c \ + tc11_XCHG.c tc12_rwl_trivial.c tc13_laog1.c \ + tc14_laog_dinphils.c tc15_laog_lockdel.c tc16_byterace.c \ + tc17_sembar.c tc18_semabuse.c tc19_shadowmem.c \ + tc20_verifywrap.c tc21_pthonce.c tc22_exit_w_lock.c \ + tc23_bogus_condwait.c tc24_nonzero_sem.c +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +BOOST_LIBS = @BOOST_LIBS@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFAULT_SUPP = @DEFAULT_SUPP@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIFF = @DIFF@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FLAG_FNO_STACK_PROTECTOR = @FLAG_FNO_STACK_PROTECTOR@ +FLAG_M32 = @FLAG_M32@ +FLAG_M64 = @FLAG_M64@ +FLAG_MAIX32 = @FLAG_MAIX32@ +FLAG_MAIX64 = @FLAG_MAIX64@ +FLAG_MMMX = @FLAG_MMMX@ +FLAG_MSSE = @FLAG_MSSE@ +FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ +FLAG_WDECL_AFTER_STMT = @FLAG_WDECL_AFTER_STMT@ +FLAG_W_EXTRA = @FLAG_W_EXTRA@ +FLAG_W_NO_FORMAT_ZERO_LENGTH = @FLAG_W_NO_FORMAT_ZERO_LENGTH@ +GDB = @GDB@ +GLIBC_VERSION = @GLIBC_VERSION@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MPI_CC = @MPI_CC@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PREFERRED_STACK_BOUNDARY = @PREFERRED_STACK_BOUNDARY@ +QTCORE_CFLAGS = @QTCORE_CFLAGS@ +QTCORE_LIBS = @QTCORE_LIBS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VALT_LOAD_ADDRESS = @VALT_LOAD_ADDRESS@ +VERSION = @VERSION@ +VEX_DIR = @VEX_DIR@ +VGCONF_ARCH_PRI = @VGCONF_ARCH_PRI@ +VGCONF_OS = @VGCONF_OS@ +VGCONF_PLATFORM_PRI_CAPS = @VGCONF_PLATFORM_PRI_CAPS@ +VGCONF_PLATFORM_SEC_CAPS = @VGCONF_PLATFORM_SEC_CAPS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Baseline flags for all compilations. Aim here is to maximise +# performance and get whatever useful warnings we can out of gcc. +AM_CFLAGS_BASE = -O2 -g -Wmissing-prototypes -Wall -Wshadow \ + -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations \ + @FLAG_W_NO_FORMAT_ZERO_LENGTH@ \ + -fno-strict-aliasing + + +# These flags are used for building the preload shared objects. +# The aim is to give reasonable performance but also to have good +# stack traces, since users often see stack traces extending +# into (and through) the preloads. +AM_CFLAGS_PIC = -O -g -fpic -fno-omit-frame-pointer -fno-strict-aliasing + +# Flags for specific targets. +# +# Nb: the AM_CPPFLAGS_* values are suitable for building tools and auxprogs. +# For building the core, coregrind/Makefile.am files add some extra things. +# +# Also: in newer versions of automake (1.10 onwards?) asm files ending with +# '.S' are considered "pre-processed" (as opposed to those ending in '.s') +# and so the CPPFLAGS are passed to the assembler. But this is not true for +# older automakes (e.g. 1.8.5, 1.9.6), sigh. So we include +# AM_CPPFLAGS_<PLATFORM> in each AM_CCASFLAGS_<PLATFORM> variable. This +# means some of the flags are duplicated on systems with newer versions of +# automake, but this does not really matter and seems hard to avoid. +AM_CPPFLAGS_COMMON = \ + -I$(top_srcdir) \ + -I$(top_srcdir)/include \ + -I@VEX_DIR@/pub + +AM_FLAG_M3264_X86_LINUX = @FLAG_M32@ +AM_CPPFLAGS_X86_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_x86=1 \ + -DVGO_linux=1 \ + -DVGP_x86_linux=1 + +AM_CFLAGS_X86_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) + +AM_CCASFLAGS_X86_LINUX = $(AM_CPPFLAGS_X86_LINUX) @FLAG_M32@ -g +AM_FLAG_M3264_AMD64_LINUX = @FLAG_M64@ +AM_CPPFLAGS_AMD64_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_amd64=1 \ + -DVGO_linux=1 \ + -DVGP_amd64_linux=1 + +AM_CFLAGS_AMD64_LINUX = @FLAG_M64@ -fomit-frame-pointer \ + @PREFERRED_STACK_BOUNDARY@ $(AM_CFLAGS_BASE) + +AM_CCASFLAGS_AMD64_LINUX = $(AM_CPPFLAGS_AMD64_LINUX) @FLAG_M64@ -g +AM_FLAG_M3264_PPC32_LINUX = @FLAG_M32@ +AM_CPPFLAGS_PPC32_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc32=1 \ + -DVGO_linux=1 \ + -DVGP_ppc32_linux=1 + +AM_CFLAGS_PPC32_LINUX = @FLAG_M32@ $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC32_LINUX = $(AM_CPPFLAGS_PPC32_LINUX) @FLAG_M32@ -g +AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ +AM_CPPFLAGS_PPC64_LINUX = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc64=1 \ + -DVGO_linux=1 \ + -DVGP_ppc64_linux=1 + +AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC64_LINUX = $(AM_CPPFLAGS_PPC64_LINUX) @FLAG_M64@ -g +AM_FLAG_M3264_PPC32_AIX5 = @FLAG_MAIX32@ +AM_CPPFLAGS_PPC32_AIX5 = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc32=1 \ + -DVGO_aix5=1 \ + -DVGP_ppc32_aix5=1 + +AM_CFLAGS_PPC32_AIX5 = @FLAG_MAIX32@ -mcpu=powerpc $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC32_AIX5 = $(AM_CPPFLAGS_PPC32_AIX5) \ + @FLAG_MAIX32@ -mcpu=powerpc -g + +AM_FLAG_M3264_PPC64_AIX5 = @FLAG_MAIX64@ +AM_CPPFLAGS_PPC64_AIX5 = $(AM_CPPFLAGS_COMMON) \ + -DVGA_ppc64=1 \ + -DVGO_aix5=1 \ + -DVGP_ppc64_aix5=1 + +AM_CFLAGS_PPC64_AIX5 = @FLAG_MAIX64@ -mcpu=powerpc64 $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC64_AIX5 = $(AM_CPPFLAGS_PPC64_AIX5) \ + @FLAG_MAIX64@ -mcpu=powerpc64 -g + + +# Flags for the primary target. These must be used to build the +# regtests and performance tests. In fact, these must be used to +# build anything which is built only once on a dual-arch build. +# +AM_FLAG_M3264_PRI = $(AM_FLAG_M3264_@VGCONF_PLATFORM_PRI_CAPS@) +AM_CPPFLAGS_PRI = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) +AM_CFLAGS_PRI = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) +AM_CCASFLAGS_PRI = $(AM_CCASFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) +@VGCONF_HAVE_PLATFORM_SEC_CAPS_FALSE@AM_FLAG_M3264_SEC = +@VGCONF_HAVE_PLATFORM_SEC_CAPS_TRUE@AM_FLAG_M3264_SEC = $(AM_FLAG_M3264_@VGCONF_PLATFORM_SEC_CAPS@) + +# Baseline link flags for making dynamic shared objects. +# +PRELOAD_LDFLAGS_COMMON_LINUX = -nodefaultlibs -shared -Wl,-z,interpose,-z,initfirst +PRELOAD_LDFLAGS_COMMON_AIX5 = -nodefaultlibs -shared -Wl,-G -Wl,-bnogc +PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ +PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ +PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ +PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ +PRELOAD_LDFLAGS_PPC32_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) @FLAG_MAIX32@ +PRELOAD_LDFLAGS_PPC64_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) @FLAG_MAIX64@ +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \ + -I$(top_srcdir)/coregrind -I$(top_builddir)/include \ + -I@VEX_DIR@/pub \ + -DVGA_$(VGCONF_ARCH_PRI)=1 \ + -DVGO_$(VGCONF_OS)=1 \ + -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1 + +# Nb: Tools need to augment these flags with an arch-selection option, such +# as $(AM_FLAG_M3264_PRI). +AM_CFLAGS = -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS = -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI) +# Include AM_CPPFLAGS in AM_CCASFLAGS to allow for older versions of +# automake; see comments in Makefile.flags.am for more detail. +AM_CCASFLAGS = $(AM_CPPFLAGS) +noinst_SCRIPTS = filter_stderr +EXTRA_DIST = $(noinst_SCRIPTS) \ + bar_bad.vgtest bar_bad.stdout.exp bar_bad.stderr.exp \ + bar_trivial.vgtest bar_trivial.stdout.exp bar_trivial.stderr.exp \ + hg01_all_ok.vgtest hg01_all_ok.stdout.exp hg01_all_ok.stderr.exp \ + hg02_deadlock.vgtest hg02_deadlock.stdout.exp hg02_deadlock.stderr.exp \ + hg03_inherit.vgtest hg03_inherit.stdout.exp hg03_inherit.stderr.exp \ + hg04_race.vgtest hg04_race.stdout.exp hg04_race.stderr.exp \ + hg05_race2.vgtest hg05_race2.stdout.exp hg05_race2.stderr.exp \ + hg06_readshared.vgtest hg06_readshared.stdout.exp \ + hg06_readshared.stderr.exp \ + pth_barrier1.vgtest pth_barrier1.stdout.exp pth_barrier1.stderr.exp \ + pth_barrier2.vgtest pth_barrier2.stdout.exp pth_barrier2.stderr.exp \ + pth_barrier3.vgtest pth_barrier3.stdout.exp pth_barrier3.stderr.exp \ + rwlock_race.vgtest rwlock_race.stdout.exp rwlock_race.stderr.exp \ + rwlock_test.vgtest rwlock_test.stdout.exp rwlock_test.stderr.exp \ + tc01_simple_race.vgtest tc01_simple_race.stdout.exp \ + tc01_simple_race.stderr.exp \ + tc02_simple_tls.vgtest tc02_simple_tls.stdout.exp \ + tc02_simple_tls.stderr.exp \ + tc03_re_excl.vgtest tc03_re_excl.stdout.exp \ + tc03_re_excl.stderr.exp \ + tc04_free_lock.vgtest tc04_free_lock.stdout.exp \ + tc04_free_lock.stderr.exp \ + tc05_simple_race.vgtest tc05_simple_race.stdout.exp \ + tc05_simple_race.stderr.exp \ + tc06_two_races.vgtest tc06_two_races.stdout.exp \ + tc06_two_races.stderr.exp \ + tc07_hbl1.vgtest tc07_hbl1.stdout.exp tc07_hbl1.stderr.exp \ + tc08_hbl2.vgtest tc08_hbl2.stdout.exp tc08_hbl2.stderr.exp \ + tc09_bad_unlock.vgtest tc09_bad_unlock.stdout.exp \ + tc09_bad_unlock.stderr.exp-glibc23-amd64 \ + tc09_bad_unlock.stderr.exp-glibc25-amd64 \ + tc09_bad_unlock.stderr.exp-glibc25-x86 \ + tc10_rec_lock.vgtest tc10_rec_lock.stdout.exp tc10_rec_lock.stderr.exp \ + tc11_XCHG.vgtest tc11_XCHG.stdout.exp tc11_XCHG.stderr.exp \ + tc12_rwl_trivial.vgtest tc12_rwl_trivial.stdout.exp \ + tc12_rwl_trivial.stderr.exp \ + tc13_laog1.vgtest tc13_laog1.stdout.exp tc13_laog1.stderr.exp \ + tc14_laog_dinphils.vgtest tc14_laog_dinphils.stdout.exp \ + tc14_laog_dinphils.stderr.exp \ + tc15_laog_lockdel.vgtest tc15_laog_lockdel.stdout.exp \ + tc15_laog_lockdel.stderr.exp \ + tc16_byterace.vgtest tc16_byterace.stdout.exp \ + tc16_byterace.stderr.exp \ + tc17_sembar.vgtest tc17_sembar.stdout.exp \ + tc17_sembar.stderr.exp \ + tc18_semabuse.vgtest tc18_semabuse.stdout.exp \ + tc18_semabuse.stderr.exp-glibc25-amd64 \ + tc18_semabuse.stderr.exp-glibc28-amd64 \ + tc19_shadowmem.vgtest tc19_shadowmem.stdout.exp \ + tc19_shadowmem.stderr.exp \ + tc20_verifywrap.vgtest tc20_verifywrap.stdout.exp \ + tc20_verifywrap.stderr.exp-glibc25-amd64 \ + tc20_verifywrap.stderr.exp-glibc27-amd64 \ + tc21_pthonce.vgtest tc21_pthonce.stdout.exp tc21_pthonce.stderr.exp \ + tc22_exit_w_lock.vgtest tc22_exit_w_lock.stdout.exp \ + tc22_exit_w_lock.stderr.exp \ + tc23_bogus_condwait.vgtest tc23_bogus_condwait.stdout.exp \ + tc23_bogus_condwait.stderr.exp \ + tc24_nonzero_sem.vgtest tc24_nonzero_sem.stdout.exp \ + tc24_nonzero_sem.stderr.exp + +LDADD = -lpthread +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.tool-tests.am $(top_srcdir)/Makefile.flags.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign helgrind/tests/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign helgrind/tests/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) +bar_bad$(EXEEXT): $(bar_bad_OBJECTS) $(bar_bad_DEPENDENCIES) + @rm -f bar_bad$(EXEEXT) + $(LINK) $(bar_bad_OBJECTS) $(bar_bad_LDADD) $(LIBS) +bar_trivial$(EXEEXT): $(bar_trivial_OBJECTS) $(bar_trivial_DEPENDENCIES) + @rm -f bar_trivial$(EXEEXT) + $(LINK) $(bar_trivial_OBJECTS) $(bar_trivial_LDADD) $(LIBS) +hg01_all_ok$(EXEEXT): $(hg01_all_ok_OBJECTS) $(hg01_all_ok_DEPENDENCIES) + @rm -f hg01_all_ok$(EXEEXT) + $(LINK) $(hg01_all_ok_OBJECTS) $(hg01_all_ok_LDADD) $(LIBS) +hg02_deadlock$(EXEEXT): $(hg02_deadlock_OBJECTS) $(hg02_deadlock_DEPENDENCIES) + @rm -f hg02_deadlock$(EXEEXT) + $(LINK) $(hg02_deadlock_OBJECTS) $(hg02_deadlock_LDADD) $(LIBS) +hg03_inherit$(EXEEXT): $(hg03_inherit_OBJECTS) $(hg03_inherit_DEPENDENCIES) + @rm -f hg03_inherit$(EXEEXT) + $(LINK) $(hg03_inherit_OBJECTS) $(hg03_inherit_LDADD) $(LIBS) +hg04_race$(EXEEXT): $(hg04_race_OBJECTS) $(hg04_race_DEPENDENCIES) + @rm -f hg04_race$(EXEEXT) + $(LINK) $(hg04_race_OBJECTS) $(hg04_race_LDADD) $(LIBS) +hg05_race2$(EXEEXT): $(hg05_race2_OBJECTS) $(hg05_race2_DEPENDENCIES) + @rm -f hg05_race2$(EXEEXT) + $(LINK) $(hg05_race2_OBJECTS) $(hg05_race2_LDADD) $(LIBS) +hg06_readshared$(EXEEXT): $(hg06_readshared_OBJECTS) $(hg06_readshared_DEPENDENCIES) + @rm -f hg06_readshared$(EXEEXT) + $(LINK) $(hg06_readshared_OBJECTS) $(hg06_readshared_LDADD) $(LIBS) +tc01_simple_race$(EXEEXT): $(tc01_simple_race_OBJECTS) $(tc01_simple_race_DEPENDENCIES) + @rm -f tc01_simple_race$(EXEEXT) + $(LINK) $(tc01_simple_race_OBJECTS) $(tc01_simple_race_LDADD) $(LIBS) +tc02_simple_tls$(EXEEXT): $(tc02_simple_tls_OBJECTS) $(tc02_simple_tls_DEPENDENCIES) + @rm -f tc02_simple_tls$(EXEEXT) + $(LINK) $(tc02_simple_tls_OBJECTS) $(tc02_simple_tls_LDADD) $(LIBS) +tc03_re_excl$(EXEEXT): $(tc03_re_excl_OBJECTS) $(tc03_re_excl_DEPENDENCIES) + @rm -f tc03_re_excl$(EXEEXT) + $(LINK) $(tc03_re_excl_OBJECTS) $(tc03_re_excl_LDADD) $(LIBS) +tc04_free_lock$(EXEEXT): $(tc04_free_lock_OBJECTS) $(tc04_free_lock_DEPENDENCIES) + @rm -f tc04_free_lock$(EXEEXT) + $(LINK) $(tc04_free_lock_OBJECTS) $(tc04_free_lock_LDADD) $(LIBS) +tc05_simple_race$(EXEEXT): $(tc05_simple_race_OBJECTS) $(tc05_simple_race_DEPENDENCIES) + @rm -f tc05_simple_race$(EXEEXT) + $(LINK) $(tc05_simple_race_OBJECTS) $(tc05_simple_race_LDADD) $(LIBS) +tc06_two_races$(EXEEXT): $(tc06_two_races_OBJECTS) $(tc06_two_races_DEPENDENCIES) + @rm -f tc06_two_races$(EXEEXT) + $(LINK) $(tc06_two_races_OBJECTS) $(tc06_two_races_LDADD) $(LIBS) +tc07_hbl1$(EXEEXT): $(tc07_hbl1_OBJECTS) $(tc07_hbl1_DEPENDENCIES) + @rm -f tc07_hbl1$(EXEEXT) + $(LINK) $(tc07_hbl1_OBJECTS) $(tc07_hbl1_LDADD) $(LIBS) +tc08_hbl2$(EXEEXT): $(tc08_hbl2_OBJECTS) $(tc08_hbl2_DEPENDENCIES) + @rm -f tc08_hbl2$(EXEEXT) + $(LINK) $(tc08_hbl2_OBJECTS) $(tc08_hbl2_LDADD) $(LIBS) +tc09_bad_unlock$(EXEEXT): $(tc09_bad_unlock_OBJECTS) $(tc09_bad_unlock_DEPENDENCIES) + @rm -f tc09_bad_unlock$(EXEEXT) + $(LINK) $(tc09_bad_unlock_OBJECTS) $(tc09_bad_unlock_LDADD) $(LIBS) +tc10_rec_lock$(EXEEXT): $(tc10_rec_lock_OBJECTS) $(tc10_rec_lock_DEPENDENCIES) + @rm -f tc10_rec_lock$(EXEEXT) + $(LINK) $(tc10_rec_lock_OBJECTS) $(tc10_rec_lock_LDADD) $(LIBS) +tc11_XCHG$(EXEEXT): $(tc11_XCHG_OBJECTS) $(tc11_XCHG_DEPENDENCIES) + @rm -f tc11_XCHG$(EXEEXT) + $(LINK) $(tc11_XCHG_OBJECTS) $(tc11_XCHG_LDADD) $(LIBS) +tc12_rwl_trivial$(EXEEXT): $(tc12_rwl_trivial_OBJECTS) $(tc12_rwl_trivial_DEPENDENCIES) + @rm -f tc12_rwl_trivial$(EXEEXT) + $(LINK) $(tc12_rwl_trivial_OBJECTS) $(tc12_rwl_trivial_LDADD) $(LIBS) +tc13_laog1$(EXEEXT): $(tc13_laog1_OBJECTS) $(tc13_laog1_DEPENDENCIES) + @rm -f tc13_laog1$(EXEEXT) + $(LINK) $(tc13_laog1_OBJECTS) $(tc13_laog1_LDADD) $(LIBS) +tc14_laog_dinphils$(EXEEXT): $(tc14_laog_dinphils_OBJECTS) $(tc14_laog_dinphils_DEPENDENCIES) + @rm -f tc14_laog_dinphils$(EXEEXT) + $(LINK) $(tc14_laog_dinphils_OBJECTS) $(tc14_laog_dinphils_LDADD) $(LIBS) +tc15_laog_lockdel$(EXEEXT): $(tc15_laog_lockdel_OBJECTS) $(tc15_laog_lockdel_DEPENDENCIES) + @rm -f tc15_laog_lockdel$(EXEEXT) + $(LINK) $(tc15_laog_lockdel_OBJECTS) $(tc15_laog_lockdel_LDADD) $(LIBS) +tc16_byterace$(EXEEXT): $(tc16_byterace_OBJECTS) $(tc16_byterace_DEPENDENCIES) + @rm -f tc16_byterace$(EXEEXT) + $(LINK) $(tc16_byterace_OBJECTS) $(tc16_byterace_LDADD) $(LIBS) +tc17_sembar$(EXEEXT): $(tc17_sembar_OBJECTS) $(tc17_sembar_DEPENDENCIES) + @rm -f tc17_sembar$(EXEEXT) + $(LINK) $(tc17_sembar_OBJECTS) $(tc17_sembar_LDADD) $(LIBS) +tc18_semabuse$(EXEEXT): $(tc18_semabuse_OBJECTS) $(tc18_semabuse_DEPENDENCIES) + @rm -f tc18_semabuse$(EXEEXT) + $(LINK) $(tc18_semabuse_OBJECTS) $(tc18_semabuse_LDADD) $(LIBS) +tc19_shadowmem$(EXEEXT): $(tc19_shadowmem_OBJECTS) $(tc19_shadowmem_DEPENDENCIES) + @rm -f tc19_shadowmem$(EXEEXT) + $(LINK) $(tc19_shadowmem_OBJECTS) $(tc19_shadowmem_LDADD) $(LIBS) +tc20_verifywrap$(EXEEXT): $(tc20_verifywrap_OBJECTS) $(tc20_verifywrap_DEPENDENCIES) + @rm -f tc20_verifywrap$(EXEEXT) + $(LINK) $(tc20_verifywrap_OBJECTS) $(tc20_verifywrap_LDADD) $(LIBS) +tc21_pthonce$(EXEEXT): $(tc21_pthonce_OBJECTS) $(tc21_pthonce_DEPENDENCIES) + @rm -f tc21_pthonce$(EXEEXT) + $(LINK) $(tc21_pthonce_OBJECTS) $(tc21_pthonce_LDADD) $(LIBS) +tc22_exit_w_lock$(EXEEXT): $(tc22_exit_w_lock_OBJECTS) $(tc22_exit_w_lock_DEPENDENCIES) + @rm -f tc22_exit_w_lock$(EXEEXT) + $(LINK) $(tc22_exit_w_lock_OBJECTS) $(tc22_exit_w_lock_LDADD) $(LIBS) +tc23_bogus_condwait$(EXEEXT): $(tc23_bogus_condwait_OBJECTS) $(tc23_bogus_condwait_DEPENDENCIES) + @rm -f tc23_bogus_condwait$(EXEEXT) + $(LINK) $(tc23_bogus_condwait_OBJECTS) $(tc23_bogus_condwait_LDADD) $(LIBS) +tc24_nonzero_sem$(EXEEXT): $(tc24_nonzero_sem_OBJECTS) $(tc24_nonzero_sem_DEPENDENCIES) + @rm -f tc24_nonzero_sem$(EXEEXT) + $(LINK) $(tc24_nonzero_sem_OBJECTS) $(tc24_nonzero_sem_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bar_bad.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bar_trivial.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hg01_all_ok.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hg02_deadlock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hg03_inherit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hg04_race.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hg05_race2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hg06_readshared.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc01_simple_race.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc02_simple_tls.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc03_re_excl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc04_free_lock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc05_simple_race.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc06_two_races.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc07_hbl1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc08_hbl2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc09_bad_unlock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc10_rec_lock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc11_XCHG.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc12_rwl_trivial.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc13_laog1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc14_laog_dinphils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc15_laog_lockdel.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc16_byterace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc17_sembar.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc18_semabuse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc19_shadowmem.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc20_verifywrap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc21_pthonce.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc22_exit_w_lock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc23_bogus_condwait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc24_nonzero_sem.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) +check: check-am +all-am: Makefile $(SCRIPTS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-checkPROGRAMS clean-generic ctags distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/helgrind/tests/bar_bad.c b/helgrind/tests/bar_bad.c new file mode 100644 index 0000000..dd6079c --- /dev/null +++ b/helgrind/tests/bar_bad.c @@ -0,0 +1,89 @@ + +/* This program checks that Helgrind reports the five degenerate + uses of the barrier functions shown. */ +#define _GNU_SOURCE +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <unistd.h> +#include <string.h> + +void* child1 ( void* arg ) +{ + pthread_barrier_wait( (pthread_barrier_t*)arg ); + return NULL; +} + +int main ( void ) +{ + pthread_barrier_t *bar1, *bar2, *bar3, *bar4, *bar5; + pthread_t thr1, thr2; + int r; + + /* possibly set up a watchdog timer thread here. */ + + + + + + + + + + + + /* initialise a barrier with a zero count */ + fprintf(stderr, "\ninitialise a barrier with zero count\n"); + bar1 = malloc(sizeof(pthread_barrier_t)); + pthread_barrier_init(bar1, NULL, 0); + + /* initialise a barrier twice */ + fprintf(stderr, "\ninitialise a barrier twice\n"); + bar2 = malloc(sizeof(pthread_barrier_t)); + pthread_barrier_init(bar2, NULL, 1); + pthread_barrier_init(bar2, NULL, 1); + + /* initialise a barrier which has threads waiting on it. + This isn't too simple. */ + fprintf(stderr, "\ninitialise a barrier which has threads waiting on it\n"); + bar3 = malloc(sizeof(pthread_barrier_t)); + pthread_barrier_init(bar3, NULL, 2); + /* create a thread, whose only purpose is to block on the barrier */ + pthread_create(&thr1, NULL, child1, (void*)bar3); + /* guarantee that it gets there first */ + sleep(1); + /* and now reinitialise */ + pthread_barrier_init(bar3, NULL, 3); + + /* destroy a barrier that has threads waiting at it */ + fprintf(stderr, "\ndestroy a barrier that has waiting threads\n"); + /* once again, create a thread, whose only purpose is to block. */ + bar4 = malloc(sizeof(pthread_barrier_t)); + pthread_barrier_init(bar4, NULL, 2); + /* create a thread, whose only purpose is to block on the barrier */ + pthread_create(&thr2, NULL, child1, (void*)bar4); + /* guarantee that it gets there first */ + sleep(1); + /* and now destroy */ + pthread_barrier_destroy(bar4); + + /* destroy a barrier that was never initialised. This is a bit + tricky, in that we have to fill the barrier with bytes which + ensure that the pthread_barrier_destroy call doesn't hang for + some reason. Zero-fill seems to work ok on amd64-linux (glibc + 2.8). */ + fprintf(stderr, "\ndestroy a barrier that was never initialised\n"); + bar5 = malloc(sizeof(pthread_barrier_t)); + assert(bar5); + memset(bar5, 0, sizeof(*bar5)); + pthread_barrier_destroy(bar5); + + /* now we need to clean up the mess .. */ + r= pthread_cancel(thr1); assert(!r); + r= pthread_cancel(thr2); assert(!r); + + free(bar1); free(bar2); free(bar3); free(bar4); free(bar5); + + return 0; +} diff --git a/helgrind/tests/bar_bad.stderr.exp b/helgrind/tests/bar_bad.stderr.exp new file mode 100644 index 0000000..7fa1270 --- /dev/null +++ b/helgrind/tests/bar_bad.stderr.exp @@ -0,0 +1,45 @@ + +initialise a barrier with zero count +Thread #x is the program's root thread + +Thread #x: pthread_barrier_init: 'count' argument is zero + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:39) + +Thread #x's call to pthread_barrier_init failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:39) + +initialise a barrier twice + +Thread #x: pthread_barrier_init: barrier is already initialised + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:45) + +initialise a barrier which has threads waiting on it + +Thread #x: pthread_barrier_init: barrier is already initialised + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:57) + +Thread #x: pthread_barrier_init: threads are waiting at barrier + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:57) + +destroy a barrier that has waiting threads + +Thread #x: pthread_barrier_destroy: threads are waiting at barrier + at 0x........: pthread_barrier_destroy (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:69) + +Thread #x's call to pthread_barrier_destroy failed + with error code 16 (EBUSY: Device or resource busy) + at 0x........: pthread_barrier_destroy (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:69) + +destroy a barrier that was never initialised + +Thread #x: pthread_barrier_destroy: barrier was never initialised + at 0x........: pthread_barrier_destroy (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:80) diff --git a/helgrind/tests/bar_bad.stdout.exp b/helgrind/tests/bar_bad.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/bar_bad.stdout.exp diff --git a/helgrind/tests/bar_bad.vgtest b/helgrind/tests/bar_bad.vgtest new file mode 100644 index 0000000..fe946f5 --- /dev/null +++ b/helgrind/tests/bar_bad.vgtest @@ -0,0 +1,3 @@ +prereq: test -e bar_bad +prog: bar_bad +vgopts: -q diff --git a/helgrind/tests/bar_trivial.c b/helgrind/tests/bar_trivial.c new file mode 100644 index 0000000..8c221ae --- /dev/null +++ b/helgrind/tests/bar_trivial.c @@ -0,0 +1,57 @@ + +/* This is the most trivial test I could think of that involves + barriers. If H fails to notice the pthread_barrier_wait call then + it will report a race. Correct behaviour is not to report a race + (there isn't one.) */ +#define _GNU_SOURCE +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <unistd.h> + +int x = 0; + +pthread_barrier_t bar; + +void* child_fn ( void* arg ) +{ + long r, n = (long)arg; + + if (n == 1) x++; + + r = pthread_barrier_wait(&bar); + assert(r == 0 || r == PTHREAD_BARRIER_SERIAL_THREAD); + + if (n == 0) x++; + + sleep(1); /* ensure both threads get to this point before + either exits. */ + return NULL; +} + +#define NTHR 2 + +int main ( void ) +{ + long i, r; + pthread_t thr[NTHR]; + + r = pthread_barrier_init(&bar, NULL, NTHR); + assert(!r); + + for (i = 0; i < NTHR; i++) { + r = pthread_create(&thr[i], NULL, child_fn, (void*)i); + assert(!r); + } + + for (i = 0; i < NTHR; i++) { + r = pthread_join(thr[i], NULL); + assert(!r); + } + + r = pthread_barrier_destroy(&bar); assert(!r); + + printf("x = %d\n", x); + return 0; +} diff --git a/helgrind/tests/bar_trivial.stderr.exp b/helgrind/tests/bar_trivial.stderr.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/bar_trivial.stderr.exp diff --git a/helgrind/tests/bar_trivial.stdout.exp b/helgrind/tests/bar_trivial.stdout.exp new file mode 100644 index 0000000..407de30 --- /dev/null +++ b/helgrind/tests/bar_trivial.stdout.exp @@ -0,0 +1 @@ +x = 2 diff --git a/helgrind/tests/bar_trivial.vgtest b/helgrind/tests/bar_trivial.vgtest new file mode 100644 index 0000000..40f2776 --- /dev/null +++ b/helgrind/tests/bar_trivial.vgtest @@ -0,0 +1,3 @@ +prereq: test -e bar_trivial +prog: bar_trivial +vgopts: -q diff --git a/helgrind/tests/filter_stderr b/helgrind/tests/filter_stderr new file mode 100755 index 0000000..5b71068 --- /dev/null +++ b/helgrind/tests/filter_stderr @@ -0,0 +1,60 @@ +#! /bin/sh + +dir=`dirname $0` + +$dir/../../tests/filter_stderr_basic | + +# Anonymise addresses +$dir/../../tests/filter_addresses | + +# Remove "Helgrind, ..." line and the following copyright line. +sed "/^Helgrind, a thread error detector/ , /./ d" | + +# Anonymise line numbers in hg_intercepts.c +sed "s/hg_intercepts.c:[0-9]\+/hg_intercepts.c:.../g" | + +# Change (eg) "/lib64/libpthread-2.5.so" into "/...libpthread..." +sed \ + -e "s/(in \/.*libpthread.*)$/(in \/...libpthread...)/" \ + -e "s/(within \/.*libpthread.*)$/(within \/...libpthread...)/" | + +# Tidy up in cases where glibc (+ libdl + libpthread + ld) have +# been built with debugging information, hence source locs are present +sed \ + -e "s/(createthread.c:[0-9]*)/(in \/...libpthread...)/g" \ + -e "s/(clone.S:[0-9]*)/(in \/...libc...)/g" \ + -e "s/start_thread (pthread_create.c:[0-9]*)$/start_thread (in \/...libpthread...)/g" | + +# Merge sem_wait and sem_wait@*, as either could be used. Likewise for +# sem_post. +sed \ + -e "s/sem_wait@\*/sem_wait/" \ + -e "s/sem_post@\*/sem_post/" | + +# get rid of the numbers in bits of text "Thread #n", "thread #n", +# "Thread n" and "thread n", +# as these make some tests more scheduling sensitive -- those where +# there are multiple threads which play interchangeable roles. +sed \ + -e "s/hread #[0-9][0-9]*/hread #x/g" \ + -e "s/hread [0-9][0-9]*/hread x/g" | + +# Likewise for frame numbers, which depend on compilation. +sed -e "s/frame #[0-9][0-9]*/frame #x/g" | \ + +# "Thread #x was created" stack traces are unreliable once you get above +# "pthread_create@* (hg_intercepts.c:...)" -- they can contan +# "pthread_create@GLIBC_", "do_clone", "clone", etc. So we cut all the +# "at"/"by" lines above "pthread_create@*". +perl -p -0 -e 's/(Thread #. was created\n)( (at|by)[^\n]*\n)*( by 0x........: pthread_create@\* \(hg_intercepts.c:...\)\n)/$1 ...\n$4/gs' | + +# Anything below "mythread_wrapper" in stack traces is unreliable, +# containing libc and libpthread stuff like start_thread, clone, etc. So we +# remove all the "by" lines below "mythread_wrapper". +perl -p -0 -e 's/( by 0x........: mythread_wrapper \(hg_intercepts.c:...\)\n)( by[^\n]*\n)*/$1 ...\n/gs' | + +# Entire trace in a "Exiting thread still holds <N> lock(s)" is unreliable, +# containing libc stuff like _Exit(), exit(), etc. So we remove all the +# "at"/"by" lines below the message. +perl -p -0 -e 's/(Thread #.: Exiting thread still holds [0-9]+ locks?\n)( (at|by)[^\n]*\n)*/$1 ...\n/gs' + diff --git a/helgrind/tests/hg01_all_ok.c b/helgrind/tests/hg01_all_ok.c new file mode 100644 index 0000000..144ce60 --- /dev/null +++ b/helgrind/tests/hg01_all_ok.c @@ -0,0 +1,32 @@ +/* All OK */ + +#include <pthread.h> + +static pthread_mutex_t mx = PTHREAD_MUTEX_INITIALIZER; + +static int shared; + +static void *th(void *v) +{ + pthread_mutex_lock(&mx); + shared++; + pthread_mutex_unlock(&mx); + + return 0; +} + +int main() +{ + pthread_t a, b; + + pthread_mutex_lock(&mx); + pthread_mutex_unlock(&mx); + + pthread_create(&a, NULL, th, NULL); + pthread_create(&b, NULL, th, NULL); + + pthread_join(a, NULL); + pthread_join(b, NULL); + + return 0; +} diff --git a/helgrind/tests/hg01_all_ok.stderr.exp b/helgrind/tests/hg01_all_ok.stderr.exp new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/hg01_all_ok.stderr.exp @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/hg01_all_ok.stdout.exp b/helgrind/tests/hg01_all_ok.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/hg01_all_ok.stdout.exp diff --git a/helgrind/tests/hg01_all_ok.vgtest b/helgrind/tests/hg01_all_ok.vgtest new file mode 100644 index 0000000..9524976 --- /dev/null +++ b/helgrind/tests/hg01_all_ok.vgtest @@ -0,0 +1 @@ +prog: hg01_all_ok diff --git a/helgrind/tests/hg02_deadlock.c b/helgrind/tests/hg02_deadlock.c new file mode 100644 index 0000000..1142f5c --- /dev/null +++ b/helgrind/tests/hg02_deadlock.c @@ -0,0 +1,43 @@ +/* Simple possible deadlock */ +#include <pthread.h> + +static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER; + +static void *t1(void *v) +{ + pthread_mutex_lock(&m1); + pthread_mutex_lock(&m2); + pthread_mutex_unlock(&m1); + pthread_mutex_unlock(&m2); + + return 0; +} + +static void *t2(void *v) +{ + pthread_mutex_lock(&m2); + pthread_mutex_lock(&m1); + pthread_mutex_unlock(&m1); + pthread_mutex_unlock(&m2); + + return 0; +} + +int main() +{ + pthread_t a, b; + + /* prevent spurious messages from the dynamic linker */ + pthread_mutex_lock(&m1); + pthread_mutex_unlock(&m1); + + pthread_create(&a, NULL, t1, NULL); + pthread_create(&b, NULL, t2, NULL); + + pthread_join(a, NULL); + pthread_join(b, NULL); + + return 0; +} + diff --git a/helgrind/tests/hg02_deadlock.stderr.exp b/helgrind/tests/hg02_deadlock.stderr.exp new file mode 100644 index 0000000..cec8d41 --- /dev/null +++ b/helgrind/tests/hg02_deadlock.stderr.exp @@ -0,0 +1,23 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (hg02_deadlock.c:36) + +Thread #x: lock order "0x........ before 0x........" violated + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: t2 (hg02_deadlock.c:20) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Required order was established by acquisition of lock at 0x........ + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: t1 (hg02_deadlock.c:9) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + followed by a later acquisition of lock at 0x........ + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: t1 (hg02_deadlock.c:10) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/hg02_deadlock.stdout.exp b/helgrind/tests/hg02_deadlock.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/hg02_deadlock.stdout.exp diff --git a/helgrind/tests/hg02_deadlock.vgtest b/helgrind/tests/hg02_deadlock.vgtest new file mode 100644 index 0000000..ff0deb7 --- /dev/null +++ b/helgrind/tests/hg02_deadlock.vgtest @@ -0,0 +1 @@ +prog: hg02_deadlock diff --git a/helgrind/tests/hg03_inherit.c b/helgrind/tests/hg03_inherit.c new file mode 100644 index 0000000..7c429f8 --- /dev/null +++ b/helgrind/tests/hg03_inherit.c @@ -0,0 +1,67 @@ + +/* I don't think this is a very good test .. all this + sleepery is highly confusing. */ + +/* test child thread inheriting data */ + +#include <stdio.h> +#include <pthread.h> +#include <unistd.h> + +static volatile int shared[2]; + +static void *t1(void *v) +{ + volatile int *ip = (int *)v; + if (0) printf("ta W\n"); + *ip += 44; + *ip *= 2; + sleep(1); + return 0; +} + +static void *t2(void *v) +{ + volatile int *ip = (int *)v; + sleep(2); + if (0) printf("tb W\n"); + *ip += 88; + *ip *= 3; + sleep(1); + return 0; +} + +int main(void) +{ + pthread_t a, b; + volatile int ret = 0; + + sleep(0); + + shared[0] = 22; + shared[1] = 77; + + pthread_create(&a, NULL, t1, (void *)&shared[0]); + // a steals shared[0] from root thread, so is excl(a) + pthread_create(&b, NULL, t2, (void *)&shared[1]); + // b steals shared[1] from root thread, so is excl(b) + + pthread_join(a, NULL); + // b's stuff (shared[1]) still belongs to b, so is excl(b) + + // ret is excl(root), and shared[0] is re-acquired as excl(root) + // since a joined to root + if (0) printf("r R1\n"); + ret += shared[0]; /* no error - a is finished */ + + // but shared[1] is excl(b); hence we're reading excl(b) + // without a lock and without a dependency edge + if (0) printf("r R2\n"); + ret += shared[1]; /* expect error - b has not finished, + so we can't touch shared[1] yet */ + + pthread_join(b, NULL); + + + return ret; +} diff --git a/helgrind/tests/hg03_inherit.stderr.exp b/helgrind/tests/hg03_inherit.stderr.exp new file mode 100644 index 0000000..feed364 --- /dev/null +++ b/helgrind/tests/hg03_inherit.stderr.exp @@ -0,0 +1,27 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (hg03_inherit.c:46) + +Thread #x is the program's root thread + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: t2 (hg03_inherit.c:28) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous read of size 4 by thread #x + at 0x........: main (hg03_inherit.c:60) + Location 0x........ is 0 bytes inside shared[1], + declared at hg03_inherit.c:11, in frame #x of thread x + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: t2 (hg03_inherit.c:29) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous read of size 4 by thread #x + at 0x........: main (hg03_inherit.c:60) + Location 0x........ is 0 bytes inside shared[1], + declared at hg03_inherit.c:11, in frame #x of thread x + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/hg03_inherit.stdout.exp b/helgrind/tests/hg03_inherit.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/hg03_inherit.stdout.exp diff --git a/helgrind/tests/hg03_inherit.vgtest b/helgrind/tests/hg03_inherit.vgtest new file mode 100644 index 0000000..548a489 --- /dev/null +++ b/helgrind/tests/hg03_inherit.vgtest @@ -0,0 +1,2 @@ +prog: hg03_inherit +vgopts: --read-var-info=yes diff --git a/helgrind/tests/hg04_race.c b/helgrind/tests/hg04_race.c new file mode 100644 index 0000000..111195b --- /dev/null +++ b/helgrind/tests/hg04_race.c @@ -0,0 +1,27 @@ +/* A simple race */ + +#include <pthread.h> +#include <unistd.h> + +static int shared; + +static void *th(void *v) +{ + shared++; + + return 0; +} + +int main() +{ + pthread_t a, b; + + pthread_create(&a, NULL, th, NULL); + sleep(1); /* force ordering */ + pthread_create(&b, NULL, th, NULL); + + pthread_join(a, NULL); + pthread_join(b, NULL); + + return 0; +} diff --git a/helgrind/tests/hg04_race.stderr.exp b/helgrind/tests/hg04_race.stderr.exp new file mode 100644 index 0000000..9996006 --- /dev/null +++ b/helgrind/tests/hg04_race.stderr.exp @@ -0,0 +1,34 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (hg04_race.c:21) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (hg04_race.c:19) + +Possible data race during read of size 4 at 0x........ by thread #x + at 0x........: th (hg04_race.c:10) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: th (hg04_race.c:10) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside local var "shared" + declared at hg04_race.c:6, in frame #x of thread x + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: th (hg04_race.c:10) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: th (hg04_race.c:10) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside local var "shared" + declared at hg04_race.c:6, in frame #x of thread x + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/hg04_race.stdout.exp b/helgrind/tests/hg04_race.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/hg04_race.stdout.exp diff --git a/helgrind/tests/hg04_race.vgtest b/helgrind/tests/hg04_race.vgtest new file mode 100644 index 0000000..42ee396 --- /dev/null +++ b/helgrind/tests/hg04_race.vgtest @@ -0,0 +1,2 @@ +prog: hg04_race +vgopts: --read-var-info=yes diff --git a/helgrind/tests/hg05_race2.c b/helgrind/tests/hg05_race2.c new file mode 100644 index 0000000..de01f2c --- /dev/null +++ b/helgrind/tests/hg05_race2.c @@ -0,0 +1,35 @@ +/* A simple race - test symaddr */ + +#include <pthread.h> +#include <unistd.h> + +struct foo { + struct bar { + int plop[22]; + char biff; + } poot[11]; +}; + +static void *th(void *v) +{ + struct foo *f = (struct foo *)v; + + f->poot[5].plop[11]++; + + return 0; +} + +int main() +{ + struct foo foo; + pthread_t a, b; + + pthread_create(&a, NULL, th, &foo); + sleep(1); /* force ordering */ + pthread_create(&b, NULL, th, &foo); + + pthread_join(a, NULL); + pthread_join(b, NULL); + + return 0; +} diff --git a/helgrind/tests/hg05_race2.stderr.exp b/helgrind/tests/hg05_race2.stderr.exp new file mode 100644 index 0000000..067a194 --- /dev/null +++ b/helgrind/tests/hg05_race2.stderr.exp @@ -0,0 +1,34 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (hg05_race2.c:29) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (hg05_race2.c:27) + +Possible data race during read of size 4 at 0x........ by thread #x + at 0x........: th (hg05_race2.c:17) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: th (hg05_race2.c:17) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside foo.poot[5].plop[11], + declared at hg05_race2.c:24, in frame #x of thread x + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: th (hg05_race2.c:17) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: th (hg05_race2.c:17) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside foo.poot[5].plop[11], + declared at hg05_race2.c:24, in frame #x of thread x + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/hg05_race2.stdout.exp b/helgrind/tests/hg05_race2.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/hg05_race2.stdout.exp diff --git a/helgrind/tests/hg05_race2.vgtest b/helgrind/tests/hg05_race2.vgtest new file mode 100644 index 0000000..250a6eb --- /dev/null +++ b/helgrind/tests/hg05_race2.vgtest @@ -0,0 +1,2 @@ +prog: hg05_race2 +vgopts: --read-var-info=yes diff --git a/helgrind/tests/hg06_readshared.c b/helgrind/tests/hg06_readshared.c new file mode 100644 index 0000000..3904b44 --- /dev/null +++ b/helgrind/tests/hg06_readshared.c @@ -0,0 +1,33 @@ +/* All OK - test allowed read sharing */ + +#include <pthread.h> +#include <assert.h> + +static int shared; + +static void *t1(void *v) +{ + return (void *)(long)(shared + 44); +} + +static void *t2(void *v) +{ + return (void *)(long)(shared + 55); +} + +int main() +{ + pthread_t a, b; + + shared = 22; + + pthread_create(&a, NULL, t1, NULL); + pthread_create(&b, NULL, t2, NULL); + + pthread_join(a, NULL); + pthread_join(b, NULL); + + assert(shared == 22); + + return 0; +} diff --git a/helgrind/tests/hg06_readshared.stderr.exp b/helgrind/tests/hg06_readshared.stderr.exp new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/hg06_readshared.stderr.exp @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/hg06_readshared.stdout.exp b/helgrind/tests/hg06_readshared.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/hg06_readshared.stdout.exp diff --git a/helgrind/tests/hg06_readshared.vgtest b/helgrind/tests/hg06_readshared.vgtest new file mode 100644 index 0000000..c5accee --- /dev/null +++ b/helgrind/tests/hg06_readshared.vgtest @@ -0,0 +1 @@ +prog: hg06_readshared diff --git a/helgrind/tests/pth_barrier1.stderr.exp b/helgrind/tests/pth_barrier1.stderr.exp new file mode 100644 index 0000000..6df3a23 --- /dev/null +++ b/helgrind/tests/pth_barrier1.stderr.exp @@ -0,0 +1,20 @@ +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: barriers_and_races (pth_barrier.c:84) + by 0x........: main (pth_barrier.c:107) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: barriers_and_races (pth_barrier.c:84) + by 0x........: main (pth_barrier.c:107) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... diff --git a/helgrind/tests/pth_barrier1.stdout.exp b/helgrind/tests/pth_barrier1.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/pth_barrier1.stdout.exp diff --git a/helgrind/tests/pth_barrier1.vgtest b/helgrind/tests/pth_barrier1.vgtest new file mode 100644 index 0000000..7b0d62f --- /dev/null +++ b/helgrind/tests/pth_barrier1.vgtest @@ -0,0 +1,4 @@ +prereq: test -e bar_trivial +prog: ../../drd/tests/pth_barrier +args: 2 1 1 +vgopts: -q diff --git a/helgrind/tests/pth_barrier2.stderr.exp b/helgrind/tests/pth_barrier2.stderr.exp new file mode 100644 index 0000000..84a2a0a --- /dev/null +++ b/helgrind/tests/pth_barrier2.stderr.exp @@ -0,0 +1,299 @@ +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: barriers_and_races (pth_barrier.c:84) + by 0x........: main (pth_barrier.c:107) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: barriers_and_races (pth_barrier.c:84) + by 0x........: main (pth_barrier.c:107) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... diff --git a/helgrind/tests/pth_barrier2.stdout.exp b/helgrind/tests/pth_barrier2.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/pth_barrier2.stdout.exp diff --git a/helgrind/tests/pth_barrier2.vgtest b/helgrind/tests/pth_barrier2.vgtest new file mode 100644 index 0000000..13036b3 --- /dev/null +++ b/helgrind/tests/pth_barrier2.vgtest @@ -0,0 +1,4 @@ +prereq: test -e bar_trivial +prog: ../../drd/tests/pth_barrier +args: 2 32 1 +vgopts: -q --cmp-race-err-addrs=yes diff --git a/helgrind/tests/pth_barrier3.stderr.exp b/helgrind/tests/pth_barrier3.stderr.exp new file mode 100644 index 0000000..6df3a23 --- /dev/null +++ b/helgrind/tests/pth_barrier3.stderr.exp @@ -0,0 +1,20 @@ +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: barriers_and_races (pth_barrier.c:84) + by 0x........: main (pth_barrier.c:107) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: barriers_and_races (pth_barrier.c:84) + by 0x........: main (pth_barrier.c:107) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: threadfunc (pth_barrier.c:57) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... diff --git a/helgrind/tests/pth_barrier3.stdout.exp b/helgrind/tests/pth_barrier3.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/pth_barrier3.stdout.exp diff --git a/helgrind/tests/pth_barrier3.vgtest b/helgrind/tests/pth_barrier3.vgtest new file mode 100644 index 0000000..06ab6c3 --- /dev/null +++ b/helgrind/tests/pth_barrier3.vgtest @@ -0,0 +1,4 @@ +prereq: test -e bar_trivial +prog: ../../drd/tests/pth_barrier +args: 32 1 1 +vgopts: -q diff --git a/helgrind/tests/rwlock_race.stderr.exp b/helgrind/tests/rwlock_race.stderr.exp new file mode 100644 index 0000000..e62847e --- /dev/null +++ b/helgrind/tests/rwlock_race.stderr.exp @@ -0,0 +1,24 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (rwlock_race.c:48) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (rwlock_race.c:47) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: thread_func (rwlock_race.c:29) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: thread_func (rwlock_race.c:29) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside local var "s_racy" + declared at rwlock_race.c:18, in frame #x of thread x +Result: 2 + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/rwlock_race.stdout.exp b/helgrind/tests/rwlock_race.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/rwlock_race.stdout.exp diff --git a/helgrind/tests/rwlock_race.vgtest b/helgrind/tests/rwlock_race.vgtest new file mode 100644 index 0000000..00b462f --- /dev/null +++ b/helgrind/tests/rwlock_race.vgtest @@ -0,0 +1,2 @@ +prog: ../../drd/tests/rwlock_race +vgopts: --read-var-info=yes diff --git a/helgrind/tests/rwlock_test.stderr.exp b/helgrind/tests/rwlock_test.stderr.exp new file mode 100644 index 0000000..a7089bb --- /dev/null +++ b/helgrind/tests/rwlock_test.stderr.exp @@ -0,0 +1,4 @@ + +Finished. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/rwlock_test.stdout.exp b/helgrind/tests/rwlock_test.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/rwlock_test.stdout.exp diff --git a/helgrind/tests/rwlock_test.vgtest b/helgrind/tests/rwlock_test.vgtest new file mode 100644 index 0000000..4257fc9 --- /dev/null +++ b/helgrind/tests/rwlock_test.vgtest @@ -0,0 +1 @@ +prog: ../../drd/tests/rwlock_test diff --git a/helgrind/tests/tc01_simple_race.c b/helgrind/tests/tc01_simple_race.c new file mode 100644 index 0000000..abf37b5 --- /dev/null +++ b/helgrind/tests/tc01_simple_race.c @@ -0,0 +1,36 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +/* Simple test program, has a race. Parent and child both modify x + with no locking. */ + +int x = 0; + +void* child_fn ( void* arg ) +{ + /* Unprotected relative to parent */ + x++; + return NULL; +} + +int main ( void ) +{ + pthread_t child; + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + /* Unprotected relative to child */ + x++; + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + return 0; +} diff --git a/helgrind/tests/tc01_simple_race.stderr.exp b/helgrind/tests/tc01_simple_race.stderr.exp new file mode 100644 index 0000000..1fc04fe --- /dev/null +++ b/helgrind/tests/tc01_simple_race.stderr.exp @@ -0,0 +1,27 @@ + +Thread #x is the program's root thread + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc01_simple_race.c:22) + +Possible data race during read of size 4 at 0x........ by thread #x + at 0x........: main (tc01_simple_race.c:28) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc01_simple_race.c:14) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "x" + declared at tc01_simple_race.c:9 + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: main (tc01_simple_race.c:28) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc01_simple_race.c:14) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "x" + declared at tc01_simple_race.c:9 + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc01_simple_race.stdout.exp b/helgrind/tests/tc01_simple_race.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc01_simple_race.stdout.exp diff --git a/helgrind/tests/tc01_simple_race.vgtest b/helgrind/tests/tc01_simple_race.vgtest new file mode 100644 index 0000000..be686ab --- /dev/null +++ b/helgrind/tests/tc01_simple_race.vgtest @@ -0,0 +1,2 @@ +prog: tc01_simple_race +vgopts: --read-var-info=yes diff --git a/helgrind/tests/tc02_simple_tls.c b/helgrind/tests/tc02_simple_tls.c new file mode 100644 index 0000000..a23b14c --- /dev/null +++ b/helgrind/tests/tc02_simple_tls.c @@ -0,0 +1,39 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +/* Simple test program, no race: parent only modified x after child + has modified it and then joined with the parent. Tests simple + thread lifetime segment handling. */ + +int x = 0; + +void* child_fn ( void* arg ) +{ + /* Unprotected relative to parent, but in child's segment only */ + x++; + return NULL; +} + +int main ( void ) +{ + pthread_t child; + + x++; /* happens in parent's segment */ + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + /* Now back in parent's segment */ + x++; + + return 0; +} diff --git a/helgrind/tests/tc02_simple_tls.stderr.exp b/helgrind/tests/tc02_simple_tls.stderr.exp new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/tc02_simple_tls.stderr.exp @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc02_simple_tls.stdout.exp b/helgrind/tests/tc02_simple_tls.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc02_simple_tls.stdout.exp diff --git a/helgrind/tests/tc02_simple_tls.vgtest b/helgrind/tests/tc02_simple_tls.vgtest new file mode 100644 index 0000000..57db35c --- /dev/null +++ b/helgrind/tests/tc02_simple_tls.vgtest @@ -0,0 +1 @@ +prog: tc02_simple_tls diff --git a/helgrind/tests/tc03_re_excl.c b/helgrind/tests/tc03_re_excl.c new file mode 100644 index 0000000..4f3ce51 --- /dev/null +++ b/helgrind/tests/tc03_re_excl.c @@ -0,0 +1,44 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +/* Simple test program, no race: parent only modifies x after child + has modified it and then joined with the parent. Tests simple + thread lifetime segment handling. */ + +/* A simple function to "use" a value, so that gcc can't + possibly optimise it into nothing. */ +static void use ( int x ) { + __asm__ __volatile__( "nop" : : "r"(x) : "cc","memory" ); +} + +static void* worker_thread ( void* argV ) +{ + int* arg = (int*)argV; + use(arg[5]); /* read access */ + return NULL; +} + +int main ( void ) +{ + pthread_t thread_id; + volatile int* x = malloc(10 * sizeof(int)); + x[5] = 1; + /* x[5] is Excl(parent) */ + + pthread_create(&thread_id, 0, worker_thread, (void*)x); + + use(x[5]); /* read access */ + + /* Just before the threads join, x[5] is ShR (read by both parent + and child) */ + pthread_join(thread_id, 0); + /* x[5] is Excl(parent), because only parent and child accessed it + and child has merged to parent. So now it's ok for parent to + access it without locking. */ + + x[5] = 0; /* write access */ + + return x[5]; +} diff --git a/helgrind/tests/tc03_re_excl.stderr.exp b/helgrind/tests/tc03_re_excl.stderr.exp new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/tc03_re_excl.stderr.exp @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc03_re_excl.stdout.exp b/helgrind/tests/tc03_re_excl.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc03_re_excl.stdout.exp diff --git a/helgrind/tests/tc03_re_excl.vgtest b/helgrind/tests/tc03_re_excl.vgtest new file mode 100644 index 0000000..e12924a --- /dev/null +++ b/helgrind/tests/tc03_re_excl.vgtest @@ -0,0 +1 @@ +prog: tc03_re_excl diff --git a/helgrind/tests/tc04_free_lock.c b/helgrind/tests/tc04_free_lock.c new file mode 100644 index 0000000..c1ffa25 --- /dev/null +++ b/helgrind/tests/tc04_free_lock.c @@ -0,0 +1,50 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> + +/* Delete memory that has a held lock and see what happens. */ + +typedef struct { int stuff[2000]; + pthread_mutex_t lock; int morestuff[2000]; } XX; + +void bar ( void ); +void foo ( void ); + +int main ( void ) +{ + XX* xx = malloc(sizeof(XX)); + assert(xx); + + pthread_mutex_init( &xx->lock, NULL ); + + pthread_mutex_lock( &xx->lock ); + + free(xx); + + bar(); + foo(); + bar(); + + return 0; +} + +/* Try the same, on the stack */ +void bar ( void ) +{ + pthread_mutex_t mx = PTHREAD_MUTEX_INITIALIZER; + // pthread_mutex_init( &mx, NULL ); + pthread_mutex_lock( &mx ); + /* now just abandon mx */ +} + +/* and again ... */ +void foo ( void ) +{ + pthread_mutex_t mx; + pthread_mutex_init( &mx, NULL ); + pthread_mutex_lock( &mx ); + /* now just abandon mx */ +} + diff --git a/helgrind/tests/tc04_free_lock.stderr.exp b/helgrind/tests/tc04_free_lock.stderr.exp new file mode 100644 index 0000000..11a0329 --- /dev/null +++ b/helgrind/tests/tc04_free_lock.stderr.exp @@ -0,0 +1,7 @@ + +Thread #x is the program's root thread + +Thread #x: Exiting thread still holds 2 locks + ... + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc04_free_lock.stdout.exp b/helgrind/tests/tc04_free_lock.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc04_free_lock.stdout.exp diff --git a/helgrind/tests/tc04_free_lock.vgtest b/helgrind/tests/tc04_free_lock.vgtest new file mode 100644 index 0000000..27d28bf --- /dev/null +++ b/helgrind/tests/tc04_free_lock.vgtest @@ -0,0 +1 @@ +prog: tc04_free_lock diff --git a/helgrind/tests/tc05_simple_race.c b/helgrind/tests/tc05_simple_race.c new file mode 100644 index 0000000..287c12c --- /dev/null +++ b/helgrind/tests/tc05_simple_race.c @@ -0,0 +1,44 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +/* Simple test program, has a race. Parent and child both modify y + with no locking. This is the program shown in Fig 2 of the + original Eraser paper by Savage et al. */ + +int y = 0, v = 0; +pthread_mutex_t mu = PTHREAD_MUTEX_INITIALIZER; + +void* child_fn ( void* arg ) +{ + /* "Thread 2" in the paper */ + pthread_mutex_lock( &mu ); + v = v + 1; + pthread_mutex_unlock( &mu ); + y = y + 1; + return NULL; +} + +int main ( void ) +{ + pthread_t child; + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + /* "Thread 1" in the paper */ + y = y + 1; + pthread_mutex_lock( &mu ); + v = v + 1; + pthread_mutex_unlock( &mu ); + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + return 0; +} diff --git a/helgrind/tests/tc05_simple_race.stderr.exp b/helgrind/tests/tc05_simple_race.stderr.exp new file mode 100644 index 0000000..f90f6b2 --- /dev/null +++ b/helgrind/tests/tc05_simple_race.stderr.exp @@ -0,0 +1,27 @@ + +Thread #x is the program's root thread + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc05_simple_race.c:27) + +Possible data race during read of size 4 at 0x........ by thread #x + at 0x........: main (tc05_simple_race.c:33) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc05_simple_race.c:19) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "y" + declared at tc05_simple_race.c:10 + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: main (tc05_simple_race.c:33) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc05_simple_race.c:19) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "y" + declared at tc05_simple_race.c:10 + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc05_simple_race.stdout.exp b/helgrind/tests/tc05_simple_race.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc05_simple_race.stdout.exp diff --git a/helgrind/tests/tc05_simple_race.vgtest b/helgrind/tests/tc05_simple_race.vgtest new file mode 100644 index 0000000..0d6800a --- /dev/null +++ b/helgrind/tests/tc05_simple_race.vgtest @@ -0,0 +1,2 @@ +prog: tc05_simple_race +vgopts: --read-var-info=yes diff --git a/helgrind/tests/tc06_two_races.c b/helgrind/tests/tc06_two_races.c new file mode 100644 index 0000000..4eaf9dd --- /dev/null +++ b/helgrind/tests/tc06_two_races.c @@ -0,0 +1,43 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +/* Simple test program, has two races. A happens-before detector can only + ever detect one of them, though. XXX: apparently not so; Drd and H 3.4 detect both. */ + +int unprot1 = 0, unprot2 = 0, prot = 0; +pthread_mutex_t mu = PTHREAD_MUTEX_INITIALIZER; + +void* child_fn ( void* arg ) +{ + unprot1 ++; + pthread_mutex_lock( &mu ); + prot ++; + pthread_mutex_unlock( &mu ); + unprot2 ++; + return NULL; +} + +int main ( void ) +{ + pthread_t child; + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + unprot1 ++; + pthread_mutex_lock( &mu ); + prot ++; + pthread_mutex_unlock( &mu ); + unprot2 ++; + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + return 0; +} diff --git a/helgrind/tests/tc06_two_races.stderr.exp b/helgrind/tests/tc06_two_races.stderr.exp new file mode 100644 index 0000000..c49d364 --- /dev/null +++ b/helgrind/tests/tc06_two_races.stderr.exp @@ -0,0 +1,45 @@ + +Thread #x is the program's root thread + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc06_two_races.c:26) + +Possible data race during read of size 4 at 0x........ by thread #x + at 0x........: main (tc06_two_races.c:31) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc06_two_races.c:14) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "unprot1" + declared at tc06_two_races.c:9 + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: main (tc06_two_races.c:31) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc06_two_races.c:14) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "unprot1" + declared at tc06_two_races.c:9 + +Possible data race during read of size 4 at 0x........ by thread #x + at 0x........: main (tc06_two_races.c:35) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc06_two_races.c:18) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "unprot2" + declared at tc06_two_races.c:9 + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: main (tc06_two_races.c:35) + This conflicts with a previous write of size 4 by thread #x + at 0x........: child_fn (tc06_two_races.c:18) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "unprot2" + declared at tc06_two_races.c:9 + +ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc06_two_races.stdout.exp b/helgrind/tests/tc06_two_races.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc06_two_races.stdout.exp diff --git a/helgrind/tests/tc06_two_races.vgtest b/helgrind/tests/tc06_two_races.vgtest new file mode 100644 index 0000000..28f9bdf --- /dev/null +++ b/helgrind/tests/tc06_two_races.vgtest @@ -0,0 +1,2 @@ +prog: tc06_two_races +vgopts: --read-var-info=yes diff --git a/helgrind/tests/tc07_hbl1.c b/helgrind/tests/tc07_hbl1.c new file mode 100644 index 0000000..12253aa --- /dev/null +++ b/helgrind/tests/tc07_hbl1.c @@ -0,0 +1,77 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +/* Simple test program, no race. Parent and child both modify x and + use the hardware bus lock. */ + +#undef PLAT_x86_linux +#undef PLAT_amd64_linux +#undef PLAT_ppc32_linux +#undef PLAT_ppc64_linux +#undef PLAT_ppc32_aix5 +#undef PLAT_ppc64_aix5 + +#if !defined(_AIX) && defined(__i386__) +# define PLAT_x86_linux 1 +#elif !defined(_AIX) && defined(__x86_64__) +# define PLAT_amd64_linux 1 +#elif !defined(_AIX) && defined(__powerpc__) && !defined(__powerpc64__) +# define PLAT_ppc32_linux 1 +#elif !defined(_AIX) && defined(__powerpc__) && defined(__powerpc64__) +# define PLAT_ppc64_linux 1 +#elif defined(_AIX) && defined(__64BIT__) +# define PLAT_ppc64_aix5 1 +#elif defined(_AIX) && !defined(__64BIT__) +# define PLAT_ppc32_aix5 1 +#endif + +#if defined(PLAT_amd64_linux) || defined(PLAT_x86_linux) +# define INC(_lval,_lqual) \ + __asm__ __volatile__ ( \ + "lock ; incl (%0)" : /*out*/ : /*in*/"r"(&(_lval)) : "memory", "cc" ) +#elif defined(PLAT_ppc32_linux) || defined(PLAT_ppc64_linux) \ + || defined(PLAT_ppc32_aix5) || defined(PLAT_ppc64_aix5) +# define INC(_lval,_lqual) \ + __asm__ __volatile__( \ + "L1xyzzy1" _lqual ":\n" \ + " lwarx 15,0,%0\n" \ + " addi 15,15,1\n" \ + " stwcx. 15,0,%0\n" \ + " bne- L1xyzzy1" _lqual \ + : /*out*/ : /*in*/ "b"(&(_lval)) \ + : /*trash*/ "r15", "cr0", "memory" \ + ) +#else +# error "Fix Me for this platform" +#endif + + +int x = 0; + +void* child_fn ( void* arg ) +{ + INC(x, "childfn"); + return NULL; +} + +int main ( void ) +{ + pthread_t child; + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + INC(x, "main"); + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + printf("x = %d\n", x); + return 0; +} diff --git a/helgrind/tests/tc07_hbl1.stderr.exp b/helgrind/tests/tc07_hbl1.stderr.exp new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/tc07_hbl1.stderr.exp @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc07_hbl1.stdout.exp b/helgrind/tests/tc07_hbl1.stdout.exp new file mode 100644 index 0000000..407de30 --- /dev/null +++ b/helgrind/tests/tc07_hbl1.stdout.exp @@ -0,0 +1 @@ +x = 2 diff --git a/helgrind/tests/tc07_hbl1.vgtest b/helgrind/tests/tc07_hbl1.vgtest new file mode 100644 index 0000000..71c463f --- /dev/null +++ b/helgrind/tests/tc07_hbl1.vgtest @@ -0,0 +1 @@ +prog: tc07_hbl1 diff --git a/helgrind/tests/tc08_hbl2.c b/helgrind/tests/tc08_hbl2.c new file mode 100644 index 0000000..d67435a --- /dev/null +++ b/helgrind/tests/tc08_hbl2.c @@ -0,0 +1,117 @@ + +/* FIXME: this is basically a bad test as it is scheduling- + sensitive. Sometimes the output is: + + child: new value 6 + child: new value 10 + done, x = 10 + + and sometimes + + child: new value 10 + done, x = 10 +*/ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + +/* Simple test program, no race. Parent writes atomically to a counter + whilst child reads it. When counter reaches a prearranged value, + child joins back to parent. Parent (writer) uses hardware bus lock; + child is only reading and so does not need to use a bus lock. */ + + +#undef PLAT_x86_linux +#undef PLAT_amd64_linux +#undef PLAT_ppc32_linux +#undef PLAT_ppc64_linux +#undef PLAT_ppc32_aix5 +#undef PLAT_ppc64_aix5 + +#if !defined(_AIX) && defined(__i386__) +# define PLAT_x86_linux 1 +#elif !defined(_AIX) && defined(__x86_64__) +# define PLAT_amd64_linux 1 +#elif !defined(_AIX) && defined(__powerpc__) && !defined(__powerpc64__) +# define PLAT_ppc32_linux 1 +#elif !defined(_AIX) && defined(__powerpc__) && defined(__powerpc64__) +# define PLAT_ppc64_linux 1 +#elif defined(_AIX) && defined(__64BIT__) +# define PLAT_ppc64_aix5 1 +#elif defined(_AIX) && !defined(__64BIT__) +# define PLAT_ppc32_aix5 1 +#endif + +#if defined(PLAT_amd64_linux) || defined(PLAT_x86_linux) +# define INC(_lval,_lqual) \ + __asm__ __volatile__ ( \ + "lock ; incl (%0)" : /*out*/ : /*in*/"r"(&(_lval)) : "memory", "cc" ) +#elif defined(PLAT_ppc32_linux) || defined(PLAT_ppc64_linux) \ + || defined(PLAT_ppc32_aix5) || defined(PLAT_ppc64_aix5) +# define INC(_lval,_lqual) \ + __asm__ __volatile__( \ + "L1xyzzy1" _lqual ":\n" \ + " lwarx 15,0,%0\n" \ + " addi 15,15,1\n" \ + " stwcx. 15,0,%0\n" \ + " bne- L1xyzzy1" _lqual \ + : /*out*/ : /*in*/ "b"(&(_lval)) \ + : /*trash*/ "r15", "cr0", "memory" \ + ) +#else +# error "Fix Me for this platform" +#endif + + + +#define LIMIT 10 + +volatile int x = 0; + +void* child_fn ( void* arg ) +{ + int q = 0; + int oldx = 0; + int ctr = 0; + while (1) { + q = (x >= LIMIT); + if (x != oldx) { + oldx = x; + printf("child: new value %d\n", oldx); + fflush(stdout); + } + if (q) break; + /* Make sure the parent doesn't starve. Seems to be a problem + on very slow machines. */ + ctr++; + if (ctr == 2000000) sleep(1); + } + return NULL; +} + +int main ( void ) +{ + pthread_t child; + int i; + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + for (i = 0; i < LIMIT; i++) { + INC(x, "main"); + if (i == 5) sleep(1); /* make sure child doesn't starve */ + } + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + printf("done, x = %d\n", x); + + return 0; +} diff --git a/helgrind/tests/tc08_hbl2.stderr.exp b/helgrind/tests/tc08_hbl2.stderr.exp new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/tc08_hbl2.stderr.exp @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc08_hbl2.stdout.exp b/helgrind/tests/tc08_hbl2.stdout.exp new file mode 100644 index 0000000..ce39ad5 --- /dev/null +++ b/helgrind/tests/tc08_hbl2.stdout.exp @@ -0,0 +1,3 @@ +child: new value 6 +child: new value 10 +done, x = 10 diff --git a/helgrind/tests/tc08_hbl2.vgtest b/helgrind/tests/tc08_hbl2.vgtest new file mode 100644 index 0000000..6d0a2cb --- /dev/null +++ b/helgrind/tests/tc08_hbl2.vgtest @@ -0,0 +1 @@ +prog: tc08_hbl2 diff --git a/helgrind/tests/tc09_bad_unlock.c b/helgrind/tests/tc09_bad_unlock.c new file mode 100644 index 0000000..238ce9b --- /dev/null +++ b/helgrind/tests/tc09_bad_unlock.c @@ -0,0 +1,52 @@ + +/* Check that an error is reported for various kinds of bogus + pthread_mutex_unlock calls. */ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +void* child_fn ( void* arg ) +{ + pthread_mutex_unlock( (pthread_mutex_t*)arg ); /* ERROR */ + return NULL; +} + +void nearly_main ( void ) +{ + pthread_t child; + pthread_mutex_t mx1, mx2; + int bogus[100], i; + /* fill bogus with values which will cause glibc's pth_mx_unlock to fail */ + for (i = 0; i < 100; i++) bogus[i] = 0xFFFFFFFF; + /* Unlocking a lock that is already unlocked */ + pthread_mutex_init( &mx1, NULL ); + pthread_mutex_lock( &mx1 ); + pthread_mutex_unlock( &mx1 ); + + pthread_mutex_unlock( &mx1 ); /* ERROR */ + + /* Unlocking a lock that is held by a different thread */ + + pthread_mutex_init( &mx2, NULL ); + pthread_mutex_lock( &mx2 ); + // start child and get it to unlock this lock + + pthread_create( &child, NULL, child_fn, (void*)&mx2 ); + /* child runs and attempts to unlock our lock. Error + is reported in child_fn. */ + pthread_join(child, NULL ); + + /* Unlocking a totally bogus lock. */ + pthread_mutex_unlock( (pthread_mutex_t*) &bogus[50] ); /* ERROR */ + + /* Now we get a freeing-locked-lock error, since the stack + frame is removed whilst mx2 is still locked. */ +} + +int main ( void ) +{ + nearly_main(); fprintf(stderr, "---------------------\n" ); + nearly_main(); + return 0; +} diff --git a/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc23-amd64 b/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc23-amd64 new file mode 100644 index 0000000..d78d98a --- /dev/null +++ b/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc23-amd64 @@ -0,0 +1,80 @@ + +Thread #x is the program's root thread + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:27) + by 0x........: main (tc09_bad_unlock.c:49) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:23) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:35) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked lock at 0x........ currently held by thread #x + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: child_fn (tc09_bad_unlock.c:11) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x deallocated location 0x........ containing a locked lock + at 0x........: nearly_main (tc09_bad_unlock.c:45) + by 0x........: main (tc09_bad_unlock.c:49) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:27) + by 0x........: main (tc09_bad_unlock.c:50) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:23) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:35) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x unlocked lock at 0x........ currently held by thread #x + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: child_fn (tc09_bad_unlock.c:11) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x deallocated location 0x........ containing a locked lock + at 0x........: nearly_main (tc09_bad_unlock.c:45) + by 0x........: main (tc09_bad_unlock.c:50) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:50) + +ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc25-amd64 b/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc25-amd64 new file mode 100644 index 0000000..51ff990 --- /dev/null +++ b/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc25-amd64 @@ -0,0 +1,90 @@ + +Thread #x is the program's root thread + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:27) + by 0x........: main (tc09_bad_unlock.c:49) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:23) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:35) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked lock at 0x........ currently held by thread #x + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: child_fn (tc09_bad_unlock.c:11) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x's call to pthread_mutex_unlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:49) +--------------------- + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:27) + by 0x........: main (tc09_bad_unlock.c:50) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:23) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x: Attempt to re-lock a non-recursive lock I already hold + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:32) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x: Bug in libpthread: recursive write lock granted on mutex/wrlock which does not support recursion + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:32) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:35) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x unlocked lock at 0x........ currently held by thread #x + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: child_fn (tc09_bad_unlock.c:11) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x's call to pthread_mutex_unlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x: Exiting thread still holds 1 lock + ... + +ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc25-x86 b/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc25-x86 new file mode 100644 index 0000000..1e53aa6 --- /dev/null +++ b/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc25-x86 @@ -0,0 +1,92 @@ + +Thread #x is the program's root thread + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:27) + by 0x........: main (tc09_bad_unlock.c:49) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:23) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:35) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked lock at 0x........ currently held by thread #x + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: child_fn (tc09_bad_unlock.c:11) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x's call to pthread_mutex_unlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x deallocated location 0x........ containing a locked lock + at 0x........: nearly_main (tc09_bad_unlock.c:45) + by 0x........: main (tc09_bad_unlock.c:49) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:49) + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:27) + by 0x........: main (tc09_bad_unlock.c:50) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:23) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:35) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x unlocked lock at 0x........ currently held by thread #x + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: child_fn (tc09_bad_unlock.c:11) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x's call to pthread_mutex_unlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:41) + by 0x........: main (tc09_bad_unlock.c:50) + +Thread #x deallocated location 0x........ containing a locked lock + at 0x........: nearly_main (tc09_bad_unlock.c:45) + by 0x........: main (tc09_bad_unlock.c:50) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc09_bad_unlock.c:31) + by 0x........: main (tc09_bad_unlock.c:50) + +ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc09_bad_unlock.stdout.exp b/helgrind/tests/tc09_bad_unlock.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc09_bad_unlock.stdout.exp diff --git a/helgrind/tests/tc09_bad_unlock.vgtest b/helgrind/tests/tc09_bad_unlock.vgtest new file mode 100644 index 0000000..d09a702 --- /dev/null +++ b/helgrind/tests/tc09_bad_unlock.vgtest @@ -0,0 +1 @@ +prog: tc09_bad_unlock diff --git a/helgrind/tests/tc10_rec_lock.c b/helgrind/tests/tc10_rec_lock.c new file mode 100644 index 0000000..648305c --- /dev/null +++ b/helgrind/tests/tc10_rec_lock.c @@ -0,0 +1,49 @@ + +/* Do simple things with a recursive mutex. */ + +/* Needed for older glibcs (2.3 and older, at least) who don't + otherwise "know" about pthread_rwlock_anything or about + PTHREAD_MUTEX_RECURSIVE (amongst things). */ +#define _GNU_SOURCE 1 + +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <pthread.h> + +void nearly_main ( void ) +{ + pthread_mutex_t mx1; + pthread_mutexattr_t attr; + int r; + + r = pthread_mutexattr_init( &attr ); + assert(r==0); + r = pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE ); + assert(r==0); + r = pthread_mutex_init( &mx1, &attr ); + assert(r==0); + + fprintf(stderr, "before lock #1\n"); + r = pthread_mutex_lock( &mx1 ); assert(r == 0); + fprintf(stderr, "before lock #2\n"); + r = pthread_mutex_lock( &mx1 ); assert(r == 0); + fprintf(stderr, "before lock #3\n"); + r = pthread_mutex_lock( &mx1 ); assert(r == 0); + + fprintf(stderr, "before unlock #1\n"); + r = pthread_mutex_unlock( &mx1 ); assert(r == 0); + fprintf(stderr, "before unlock #2\n"); + r = pthread_mutex_unlock( &mx1 ); assert(r == 0); + fprintf(stderr, "before unlock #3\n"); + r = pthread_mutex_unlock( &mx1 ); assert(r == 0); + + fprintf(stderr, "before unlock #4\n"); + r = pthread_mutex_unlock( &mx1 ); /* FAILS: assert(r == 0); */ +} + +int main ( void ) +{ + nearly_main(); + return 0; +} diff --git a/helgrind/tests/tc10_rec_lock.stderr.exp b/helgrind/tests/tc10_rec_lock.stderr.exp new file mode 100644 index 0000000..7e65ba7 --- /dev/null +++ b/helgrind/tests/tc10_rec_lock.stderr.exp @@ -0,0 +1,26 @@ + +before lock #1 +before lock #2 +before lock #3 +before unlock #1 +before unlock #2 +before unlock #3 +before unlock #4 +Thread #x is the program's root thread + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc10_rec_lock.c:42) + by 0x........: main (tc10_rec_lock.c:47) + Lock at 0x........ was first observed + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: nearly_main (tc10_rec_lock.c:24) + by 0x........: main (tc10_rec_lock.c:47) + +Thread #x's call to pthread_mutex_unlock failed + with error code 1 (EPERM: Operation not permitted) + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: nearly_main (tc10_rec_lock.c:42) + by 0x........: main (tc10_rec_lock.c:47) + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc10_rec_lock.stdout.exp b/helgrind/tests/tc10_rec_lock.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc10_rec_lock.stdout.exp diff --git a/helgrind/tests/tc10_rec_lock.vgtest b/helgrind/tests/tc10_rec_lock.vgtest new file mode 100644 index 0000000..bfd0f89 --- /dev/null +++ b/helgrind/tests/tc10_rec_lock.vgtest @@ -0,0 +1 @@ +prog: tc10_rec_lock diff --git a/helgrind/tests/tc11_XCHG.c b/helgrind/tests/tc11_XCHG.c new file mode 100644 index 0000000..22c6baf --- /dev/null +++ b/helgrind/tests/tc11_XCHG.c @@ -0,0 +1,112 @@ + +#include "config.h" +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> + +/* Simple test program, no race. Parent and child both modify x and + use the hardware bus lock (implicitly, since XCHG r,m on x86/amd64 + does not require an explicit LOCK prefix.). */ + +#undef PLAT_x86_linux +#undef PLAT_amd64_linux +#undef PLAT_ppc32_linux +#undef PLAT_ppc64_linux +#undef PLAT_ppc32_aix5 +#undef PLAT_ppc64_aix5 + +#if !defined(_AIX) && defined(__i386__) +# define PLAT_x86_linux 1 +#elif !defined(_AIX) && defined(__x86_64__) +# define PLAT_amd64_linux 1 +#elif !defined(_AIX) && defined(__powerpc__) && !defined(__powerpc64__) +# define PLAT_ppc32_linux 1 +#elif !defined(_AIX) && defined(__powerpc__) && defined(__powerpc64__) +# define PLAT_ppc64_linux 1 +#elif defined(_AIX) && defined(__64BIT__) +# define PLAT_ppc64_aix5 1 +#elif defined(_AIX) && !defined(__64BIT__) +# define PLAT_ppc32_aix5 1 +#endif + + +#if defined(PLAT_amd64_linux) || defined(PLAT_x86_linux) +# define XCHG_M_R(_addr,_lval) \ + __asm__ __volatile__( \ + "xchgl %0, %1" \ + : /*out*/ "+r"(_lval) \ + : /*in*/ "m"(_addr) \ + : "memory", "cc" \ + ) +# define XCHG_M_R_with_redundant_LOCK(_addr,_lval) \ + __asm__ __volatile__( \ + "lock xchgl %0, %1" \ + : /*out*/ "+r"(_lval) \ + : /*in*/ "m"(_addr) \ + : "memory", "cc" \ + ) + +#elif defined(PLAT_ppc32_linux) || defined(PLAT_ppc64_linux) \ + || defined(PLAT_ppc32_aix5) || defined(PLAT_ppc64_aix5) +# if defined(HAVE_BUILTIN_ATOMIC) +# define XCHG_M_R(_addr,_lval) \ + do { \ + int tmp; \ + while ((tmp = *(int*)(& _addr)), \ + ! __sync_bool_compare_and_swap((int*)&_addr, tmp, _lval)) \ + ; \ + _lval = tmp; \ + } while (0) +# else +# warning "XCHG_M_R() implementation is missing. Either" \ + "provide one or use a newer gcc version." +# define XCHG_M_R(_addr,_lval) \ + do { int tmp = *(int*)(& _addr); \ + *(int*)(& _addr) = (_lval); \ + _lval = tmp; \ + } while (0) +# endif +# define XCHG_M_R_with_redundant_LOCK(_addr,_lval) \ + XCHG_M_R(_addr,_lval) + +#else +# error "Unsupported architecture" + +#endif + +int x = 0; + +void* child_fn ( void* arg ) +{ + int v = 12345; + XCHG_M_R_with_redundant_LOCK(x, v); + assert(v == 0 || v == 6789); + return NULL; +} + +int main ( void ) +{ + int v = 6789; + pthread_t child; + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + XCHG_M_R(x, v); + assert(v == 0 || v == 12345); + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + if (v == 0 || v == 12345) + printf("success\n"); + else + printf("failure\n"); + + return v; +} diff --git a/helgrind/tests/tc11_XCHG.stderr.exp b/helgrind/tests/tc11_XCHG.stderr.exp new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/tc11_XCHG.stderr.exp @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc11_XCHG.stdout.exp b/helgrind/tests/tc11_XCHG.stdout.exp new file mode 100644 index 0000000..2e9ba47 --- /dev/null +++ b/helgrind/tests/tc11_XCHG.stdout.exp @@ -0,0 +1 @@ +success diff --git a/helgrind/tests/tc11_XCHG.vgtest b/helgrind/tests/tc11_XCHG.vgtest new file mode 100644 index 0000000..342199b --- /dev/null +++ b/helgrind/tests/tc11_XCHG.vgtest @@ -0,0 +1 @@ +prog: tc11_XCHG diff --git a/helgrind/tests/tc12_rwl_trivial.c b/helgrind/tests/tc12_rwl_trivial.c new file mode 100644 index 0000000..9dc8e84 --- /dev/null +++ b/helgrind/tests/tc12_rwl_trivial.c @@ -0,0 +1,34 @@ + +/* Needed for older glibcs (2.3 and older, at least) who don't + otherwise "know" about pthread_rwlock_anything or about + PTHREAD_MUTEX_RECURSIVE (amongst things). */ +#define _GNU_SOURCE 1 + +#include <stdio.h> +#include <pthread.h> +#include <assert.h> + +/* Do trivial stuff with a reader-writer lock. */ + +int main ( void ) +{ + int r; + pthread_rwlock_t rwl; + + r = pthread_rwlock_init( &rwl, NULL ); assert(r == 0); + + r = pthread_rwlock_wrlock( &rwl ); assert(r == 0); + r = pthread_rwlock_unlock( &rwl ); assert(r == 0); + + r = pthread_rwlock_rdlock( &rwl ); assert(r == 0); + r = pthread_rwlock_rdlock( &rwl ); assert(r == 0); + r = pthread_rwlock_unlock( &rwl ); assert(r == 0); + r = pthread_rwlock_unlock( &rwl ); assert(r == 0); + + /* this should fail - lock is unowned now */ + r = pthread_rwlock_unlock( &rwl ); assert(r == 0); + + r = pthread_rwlock_destroy( &rwl ); assert(r == 0); + + return 0; +} diff --git a/helgrind/tests/tc12_rwl_trivial.stderr.exp b/helgrind/tests/tc12_rwl_trivial.stderr.exp new file mode 100644 index 0000000..5d4f383 --- /dev/null +++ b/helgrind/tests/tc12_rwl_trivial.stderr.exp @@ -0,0 +1,11 @@ + +Thread #x is the program's root thread + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) + by 0x........: main (tc12_rwl_trivial.c:29) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (hg_intercepts.c:...) + by 0x........: main (tc12_rwl_trivial.c:18) + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc12_rwl_trivial.stdout.exp b/helgrind/tests/tc12_rwl_trivial.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc12_rwl_trivial.stdout.exp diff --git a/helgrind/tests/tc12_rwl_trivial.vgtest b/helgrind/tests/tc12_rwl_trivial.vgtest new file mode 100644 index 0000000..fdcd644 --- /dev/null +++ b/helgrind/tests/tc12_rwl_trivial.vgtest @@ -0,0 +1 @@ +prog: tc12_rwl_trivial diff --git a/helgrind/tests/tc13_laog1.c b/helgrind/tests/tc13_laog1.c new file mode 100644 index 0000000..e42ca98 --- /dev/null +++ b/helgrind/tests/tc13_laog1.c @@ -0,0 +1,33 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> + +/* The simplest possible test that triggers a lock order acquisition + error. */ + +int main ( void ) +{ + int r; + pthread_mutex_t mx1, mx2; + r = pthread_mutex_init( &mx1, NULL ); assert(r==0); + r = pthread_mutex_init( &mx2, NULL ); assert(r==0); + + r = pthread_mutex_lock( &mx1 ); assert(r==0); + r = pthread_mutex_lock( &mx2 ); assert(r==0); + + r = pthread_mutex_unlock( &mx1 ); assert(r==0); + r = pthread_mutex_unlock( &mx2 ); assert(r==0); + + r = pthread_mutex_lock( &mx2 ); assert(r==0); /* error */ + r = pthread_mutex_lock( &mx1 ); assert(r==0); + + r = pthread_mutex_unlock( &mx1 ); assert(r==0); + r = pthread_mutex_unlock( &mx2 ); assert(r==0); + + r = pthread_mutex_destroy( &mx1 ); + r = pthread_mutex_destroy( &mx2 ); + + return 0; +} diff --git a/helgrind/tests/tc13_laog1.stderr.exp b/helgrind/tests/tc13_laog1.stderr.exp new file mode 100644 index 0000000..643aef9 --- /dev/null +++ b/helgrind/tests/tc13_laog1.stderr.exp @@ -0,0 +1,14 @@ + +Thread #x is the program's root thread + +Thread #x: lock order "0x........ before 0x........" violated + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc13_laog1.c:24) + Required order was established by acquisition of lock at 0x........ + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc13_laog1.c:17) + followed by a later acquisition of lock at 0x........ + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc13_laog1.c:18) + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc13_laog1.stdout.exp b/helgrind/tests/tc13_laog1.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc13_laog1.stdout.exp diff --git a/helgrind/tests/tc13_laog1.vgtest b/helgrind/tests/tc13_laog1.vgtest new file mode 100644 index 0000000..9fa71cd --- /dev/null +++ b/helgrind/tests/tc13_laog1.vgtest @@ -0,0 +1 @@ +prog: tc13_laog1 diff --git a/helgrind/tests/tc14_laog_dinphils.c b/helgrind/tests/tc14_laog_dinphils.c new file mode 100644 index 0000000..c5af8c1 --- /dev/null +++ b/helgrind/tests/tc14_laog_dinphils.c @@ -0,0 +1,42 @@ + +#include <pthread.h> +#include <stdlib.h> +#include <unistd.h> + +/* Naive dining philosophers with inconsistent lock acquisition + ordering. */ + +static pthread_t phil[5]; +static pthread_mutex_t chop[5]; + +void* dine ( void* arg ) +{ + int i; + long left = (long)arg; + long right = (left + 1) % 5; + for (i = 0; i < 1000/*arbitrary*/; i++) { + pthread_mutex_lock(&chop[left]); + pthread_mutex_lock(&chop[right]); + /* eating */ + pthread_mutex_unlock(&chop[left]); + pthread_mutex_unlock(&chop[right]); + } + return NULL; +} + +int main ( void ) +{ + long i; + for (i = 0; i < 5; i++) + pthread_mutex_init( &chop[i], NULL); + + for (i = 0; i < 5; i++) + pthread_create(&phil[i], NULL, dine, (void*)i ); + + sleep(1); + + for (i = 0; i < 5; i++) + pthread_join(phil[i], NULL); + + return 0; +} diff --git a/helgrind/tests/tc14_laog_dinphils.stderr.exp b/helgrind/tests/tc14_laog_dinphils.stderr.exp new file mode 100644 index 0000000..f2e710f --- /dev/null +++ b/helgrind/tests/tc14_laog_dinphils.stderr.exp @@ -0,0 +1,13 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc14_laog_dinphils.c:34) + +Thread #x: lock order "0x........ before 0x........" violated + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: dine (tc14_laog_dinphils.c:19) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +ERROR SUMMARY: 1000 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc14_laog_dinphils.stdout.exp b/helgrind/tests/tc14_laog_dinphils.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc14_laog_dinphils.stdout.exp diff --git a/helgrind/tests/tc14_laog_dinphils.vgtest b/helgrind/tests/tc14_laog_dinphils.vgtest new file mode 100644 index 0000000..5871b73 --- /dev/null +++ b/helgrind/tests/tc14_laog_dinphils.vgtest @@ -0,0 +1 @@ +prog: tc14_laog_dinphils diff --git a/helgrind/tests/tc15_laog_lockdel.c b/helgrind/tests/tc15_laog_lockdel.c new file mode 100644 index 0000000..68668b1 --- /dev/null +++ b/helgrind/tests/tc15_laog_lockdel.c @@ -0,0 +1,77 @@ + +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> + +/* Test that locks, having entered the lock acquisition tracking + machinery, are forgotten by it when the client does + pthread_{mutex,rwlock}_destroy. 2008-Nov-10: see comments below. */ + +int main ( void ) +{ + int r; + pthread_mutex_t *mx1, *mx2; + + mx1 = malloc(sizeof(pthread_mutex_t)); + mx2 = malloc(sizeof(pthread_mutex_t)); + + assert(mx1); + assert(mx2); + + r = pthread_mutex_init( mx1, NULL ); assert(r==0); + r = pthread_mutex_init( mx2, NULL ); assert(r==0); + + /* Establish order 1 -> 2 */ + fprintf(stderr, "Establish order 1 -> 2\n"); + r = pthread_mutex_lock( mx1 ); assert(r==0); + r = pthread_mutex_lock( mx2 ); assert(r==0); + + r = pthread_mutex_unlock( mx1 ); assert(r==0); + r = pthread_mutex_unlock( mx2 ); assert(r==0); + + /* Try order 2 -> 1. This gives an error. */ + fprintf(stderr, "Try order 2 -> 1. This gives an error.\n"); + r = pthread_mutex_lock( mx2 ); assert(r==0); /* error */ + r = pthread_mutex_lock( mx1 ); assert(r==0); + + r = pthread_mutex_unlock( mx1 ); assert(r==0); + r = pthread_mutex_unlock( mx2 ); assert(r==0); + + /* De-initialise 2 and re-initialise it. This gives it a new + identity, so a second locking sequence 2 -> 1 should now be OK. */ + fprintf(stderr, + "Free 2 and re-allocate it. This gives it a new identity,\n"); + fprintf(stderr, "so a second locking sequence 2 -> 1 should now be OK.\n"); + pthread_mutex_destroy( mx2 ); + + + + r = pthread_mutex_init( mx2, NULL ); assert(r==0); + + r = pthread_mutex_lock( mx2 ); assert(r==0); + r = pthread_mutex_lock( mx1 ); assert(r==0); /* no error */ + + r = pthread_mutex_unlock( mx1 ); assert(r==0); + r = pthread_mutex_unlock( mx2 ); assert(r==0); + + /* done */ + + fprintf(stderr, "done\n"); + r = pthread_mutex_destroy( mx1 ); + r = pthread_mutex_destroy( mx2 ); + + free( mx1 ); + free( mx2 ); + + return 0; +} + +/* 2008-Nov-10: I believe this test is flawed and requires further + investigation. I don't think it really tests what it claims to + test. In particular, it still gives the right results if + "pthread_mutex_destroy( mx2 );" at line 46 is commented out. In + other words, laog somehow forgets about mx2 so that 2->1 lock + sequence at lines 52/3 does not produce a complaint, EVEN WHEN the + preceding "pthread_mutex_destroy( mx2 );" is not observed. I don't + know why this is, but it seems highly suspicious to me. */ diff --git a/helgrind/tests/tc15_laog_lockdel.stderr.exp b/helgrind/tests/tc15_laog_lockdel.stderr.exp new file mode 100644 index 0000000..cf7fce9 --- /dev/null +++ b/helgrind/tests/tc15_laog_lockdel.stderr.exp @@ -0,0 +1,19 @@ + +Establish order 1 -> 2 +Try order 2 -> 1. This gives an error. +Thread #x is the program's root thread + +Thread #x: lock order "0x........ before 0x........" violated + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc15_laog_lockdel.c:36) + Required order was established by acquisition of lock at 0x........ + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc15_laog_lockdel.c:27) + followed by a later acquisition of lock at 0x........ + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc15_laog_lockdel.c:28) +Free 2 and re-allocate it. This gives it a new identity, +so a second locking sequence 2 -> 1 should now be OK. +done + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc15_laog_lockdel.stdout.exp b/helgrind/tests/tc15_laog_lockdel.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc15_laog_lockdel.stdout.exp diff --git a/helgrind/tests/tc15_laog_lockdel.vgtest b/helgrind/tests/tc15_laog_lockdel.vgtest new file mode 100644 index 0000000..bd7a2ec --- /dev/null +++ b/helgrind/tests/tc15_laog_lockdel.vgtest @@ -0,0 +1 @@ +prog: tc15_laog_lockdel diff --git a/helgrind/tests/tc16_byterace.c b/helgrind/tests/tc16_byterace.c new file mode 100644 index 0000000..70a9101 --- /dev/null +++ b/helgrind/tests/tc16_byterace.c @@ -0,0 +1,42 @@ +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +/* Simple demonstration of lockset tracking at byte granularity. */ + +char bytes[10]; + +void* child_fn ( void* arg ) +{ + int i; + for (i = 0; i < 5; i++) + bytes[2*i + 0] ++; /* child accesses: 0 2 4 6 8 */ + return NULL; +} + +int main ( void ) +{ + int i; + pthread_t child; + + if (pthread_create(&child, NULL, child_fn, NULL)) { + perror("pthread_create"); + exit(1); + } + + /* Unprotected relative to child, but harmless, since different + bytes accessed */ + for (i = 0; i < 5; i++) + bytes[2*i + 1] ++; /* accesses: 1 3 5 7 9 */ + + /* Unprotected relative to child, but harmful; same bytes */ + for (i = 0; i < 3; i++) + bytes[3*i + 1] ++; /* accesses: 1 4(race!) 7 */ + + if (pthread_join(child, NULL)) { + perror("pthread join"); + exit(1); + } + + return 0; +} diff --git a/helgrind/tests/tc16_byterace.stderr.exp b/helgrind/tests/tc16_byterace.stderr.exp new file mode 100644 index 0000000..95d0011 --- /dev/null +++ b/helgrind/tests/tc16_byterace.stderr.exp @@ -0,0 +1,27 @@ + +Thread #x is the program's root thread + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc16_byterace.c:22) + +Possible data race during read of size 1 at 0x........ by thread #x + at 0x........: main (tc16_byterace.c:34) + This conflicts with a previous write of size 1 by thread #x + at 0x........: child_fn (tc16_byterace.c:13) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside bytes[4], + a global variable declared at tc16_byterace.c:7 + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: main (tc16_byterace.c:34) + This conflicts with a previous write of size 1 by thread #x + at 0x........: child_fn (tc16_byterace.c:13) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside bytes[4], + a global variable declared at tc16_byterace.c:7 + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc16_byterace.stdout.exp b/helgrind/tests/tc16_byterace.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc16_byterace.stdout.exp diff --git a/helgrind/tests/tc16_byterace.vgtest b/helgrind/tests/tc16_byterace.vgtest new file mode 100644 index 0000000..0b424a4 --- /dev/null +++ b/helgrind/tests/tc16_byterace.vgtest @@ -0,0 +1,2 @@ +prog: tc16_byterace +vgopts: --read-var-info=yes diff --git a/helgrind/tests/tc17_sembar.c b/helgrind/tests/tc17_sembar.c new file mode 100644 index 0000000..cc91f5e --- /dev/null +++ b/helgrind/tests/tc17_sembar.c @@ -0,0 +1,213 @@ + +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <pthread.h> +#include <semaphore.h> + +/* This is really a test of semaphore handling + (sem_{init,destroy,post,wait}). Using semaphores a barrier + function is created. Helgrind-3.3 (p.k.a Thrcheck) does understand + the barrier semantics implied by the barrier, as pieced together + from happens-before relationships obtained from the component + semaphores. However, it does falsely report one race. Ah well. + Helgrind-3.4 is pure h-b and so reports no races (yay!). */ + +/* This code is derived from + gcc-4.3-20071012/libgomp/config/posix/bar.c, which is + + Copyright (C) 2005 Free Software Foundation, Inc. + Contributed by Richard Henderson <rth@redhat.com>. + + and available under version 2.1 or later of the GNU Lesser General + Public License. + + Relative to the libgomp sources, the gomp_barrier_t type here has + an extra semaphore field, xxx. This is not functionally useful, + but it is used to create enough extra inter-thread dependencies + that the barrier-like behaviour of gomp_barrier_t is evident to + Thrcheck. There is no other purpose for the .xxx field. */ + +typedef struct +{ + pthread_mutex_t mutex1; + pthread_mutex_t mutex2; + sem_t sem1; + sem_t sem2; + unsigned total; + unsigned arrived; + sem_t xxx; +} gomp_barrier_t; + +typedef long bool; + +void +gomp_barrier_init (gomp_barrier_t *bar, unsigned count) +{ + pthread_mutex_init (&bar->mutex1, NULL); + pthread_mutex_init (&bar->mutex2, NULL); + sem_init (&bar->sem1, 0, 0); + sem_init (&bar->sem2, 0, 0); + sem_init (&bar->xxx, 0, 0); + bar->total = count; + bar->arrived = 0; +} + +void +gomp_barrier_destroy (gomp_barrier_t *bar) +{ + /* Before destroying, make sure all threads have left the barrier. */ + pthread_mutex_lock (&bar->mutex1); + pthread_mutex_unlock (&bar->mutex1); + + pthread_mutex_destroy (&bar->mutex1); + pthread_mutex_destroy (&bar->mutex2); + sem_destroy (&bar->sem1); + sem_destroy (&bar->sem2); + sem_destroy(&bar->xxx); +} + +void +gomp_barrier_reinit (gomp_barrier_t *bar, unsigned count) +{ + pthread_mutex_lock (&bar->mutex1); + bar->total = count; + pthread_mutex_unlock (&bar->mutex1); +} + +void +gomp_barrier_wait (gomp_barrier_t *bar) +{ + unsigned int n; + pthread_mutex_lock (&bar->mutex1); + + ++bar->arrived; + + if (bar->arrived == bar->total) + { + bar->arrived--; + n = bar->arrived; + if (n > 0) + { + { unsigned int i; + for (i = 0; i < n; i++) + sem_wait(&bar->xxx); // acquire an obvious dependency from + // all other threads arriving at the barrier + } + // 1 up n times, 2 down once + // now let all the other threads past the barrier, giving them + // an obvious dependency with this thread. + do + sem_post (&bar->sem1); // 1 up + while (--n != 0); + // and wait till the last thread has left + sem_wait (&bar->sem2); // 2 down + } + pthread_mutex_unlock (&bar->mutex1); + /* «Résultats professionnels!» First we made this thread have an + obvious (Thrcheck-visible) dependency on all other threads + calling gomp_barrier_wait. Then, we released them all again, + so they all have a (visible) dependency on this thread. + Transitively, the result is that all threads leaving the + barrier have a a Thrcheck-visible dependency on all threads + arriving at the barrier. As required. */ + } + else + { + pthread_mutex_unlock (&bar->mutex1); + sem_post(&bar->xxx); + // first N-1 threads wind up waiting here + sem_wait (&bar->sem1); // 1 down + + pthread_mutex_lock (&bar->mutex2); + n = --bar->arrived; /* XXX see below */ + pthread_mutex_unlock (&bar->mutex2); + + if (n == 0) + sem_post (&bar->sem2); // 2 up + } +} + + +/* re XXX, thrcheck reports a race at this point. It doesn't + understand that bar->arrived is protected by mutex1 whilst threads + are arriving at the barrier and by mutex2 whilst they are leaving, + but not consistently by either of them. Oh well. */ + +static gomp_barrier_t bar; + +/* What's with the volatile here? It stops gcc compiling + "if (myid == 4) { unprotected = 99; }" and + "if (myid == 3) { unprotected = 88; }" into a conditional + load followed by a store. The cmov/store sequence reads and + writes memory in all threads and cause Thrcheck to (correctly) + report a race, the underlying cause of which is that gcc is + generating non threadsafe code. + + (The lack of) thread safe code generation by gcc is currently a + hot topic. See the following discussions: + http://gcc.gnu.org/ml/gcc/2007-10/msg00266.html + http://lkml.org/lkml/2007/10/24/673 + and this is interesting background: + www.hpl.hp.com/techreports/2004/HPL-2004-209.pdf +*/ +static volatile long unprotected = 0; + +void* child ( void* argV ) +{ + long myid = (long)argV; + // assert(myid >= 2 && myid <= 5); + + /* First, we all wait to get to this point. */ + gomp_barrier_wait( &bar ); + + /* Now, thread #4 writes to 'unprotected' and so becomes its + owner. */ + if (myid == 4) { + unprotected = 99; + } + + /* Now we all wait again. */ + gomp_barrier_wait( &bar ); + + /* This time, thread #3 writes to 'unprotected'. If all goes well, + Thrcheck sees the dependency through the barrier back to thread + #4 before it, and so thread #3 becomes the exclusive owner of + 'unprotected'. */ + if (myid == 3) { + unprotected = 88; + } + + /* And just to be on the safe side ... */ + gomp_barrier_wait( &bar ); + return NULL; +} + + +int main (int argc, char *argv[]) +{ + long i; int res; + pthread_t thr[4]; + fprintf(stderr, "starting\n"); + + gomp_barrier_init( &bar, 4 ); + + for (i = 0; i < 4; i++) { + res = pthread_create( &thr[i], NULL, child, (void*)(i+2) ); + assert(!res); + } + + for (i = 0; i < 4; i++) { + res = pthread_join( thr[i], NULL ); + assert(!res); + } + + gomp_barrier_destroy( &bar ); + + /* And finally here, the root thread can get exclusive ownership + back from thread #4, because #4 has exited by this point and so + we have a dependency edge back to the write it did. */ + fprintf(stderr, "done, result is %ld, should be 88\n", unprotected); + + return 0; +} diff --git a/helgrind/tests/tc17_sembar.stderr.exp b/helgrind/tests/tc17_sembar.stderr.exp new file mode 100644 index 0000000..b3f318e --- /dev/null +++ b/helgrind/tests/tc17_sembar.stderr.exp @@ -0,0 +1,5 @@ + +starting +done, result is 88, should be 88 + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc17_sembar.stdout.exp b/helgrind/tests/tc17_sembar.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc17_sembar.stdout.exp diff --git a/helgrind/tests/tc17_sembar.vgtest b/helgrind/tests/tc17_sembar.vgtest new file mode 100644 index 0000000..643ed8a --- /dev/null +++ b/helgrind/tests/tc17_sembar.vgtest @@ -0,0 +1 @@ +prog: tc17_sembar diff --git a/helgrind/tests/tc18_semabuse.c b/helgrind/tests/tc18_semabuse.c new file mode 100644 index 0000000..40c068b --- /dev/null +++ b/helgrind/tests/tc18_semabuse.c @@ -0,0 +1,57 @@ + +/* Do stupid things with semaphores, and check that Thrcheck doesn't + fall over and does report errors appropriately. If nothing else + this just checks that the relevant functions are getting + intercepted. */ + +/* This is pretty lame, because making the sem_ functions fail is + difficult. Not sure it's really worth having. */ +#include <unistd.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <pthread.h> +#include <semaphore.h> +#include <string.h> +void start_watchdog ( void ); +int main ( void ) +{ + int r; + sem_t s1; + start_watchdog(); + /* Do sem_init with huge initial count */ + r= sem_init(&s1, 0, ~0); + + /* initialise properly */ + r= sem_init(&s1, 0, 0); + + /* in glibc, sem_destroy is a no-op; making it fail is + impossible. */ + + /* Do 'wait' on a bogus semaphore. This should fail, but on glibc + it succeeds. */ + memset(&s1, 0x55, sizeof(s1)); + r= sem_wait(&s1); /* assert(r != 0); */ + + /* this only fails with glibc 2.7 and later. */ + r= sem_post(&s1); + + sem_destroy(&s1); + + return 0; +} + +void* watchdog ( void* v ) +{ + sleep(10); + fprintf(stderr, "watchdog timer expired - not a good sign\n"); + exit(0); +} + +void start_watchdog ( void ) +{ + pthread_t t; + int r; + r= pthread_create(&t, NULL, watchdog, NULL); + assert(!r); +} diff --git a/helgrind/tests/tc18_semabuse.stderr.exp-glibc25-amd64 b/helgrind/tests/tc18_semabuse.stderr.exp-glibc25-amd64 new file mode 100644 index 0000000..c2077ed --- /dev/null +++ b/helgrind/tests/tc18_semabuse.stderr.exp-glibc25-amd64 @@ -0,0 +1,14 @@ + +Thread #x is the program's root thread + +Thread #x's call to sem_init failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: sem_init@* (hg_intercepts.c:...) + by 0x........: main (tc18_semabuse.c:23) + +Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post + at 0x........: sem_wait_WRK (hg_intercepts.c:...) + by 0x........: sem_wait (hg_intercepts.c:...) + by 0x........: main (tc18_semabuse.c:34) + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc18_semabuse.stderr.exp-glibc28-amd64 b/helgrind/tests/tc18_semabuse.stderr.exp-glibc28-amd64 new file mode 100644 index 0000000..ac8baaa --- /dev/null +++ b/helgrind/tests/tc18_semabuse.stderr.exp-glibc28-amd64 @@ -0,0 +1,20 @@ + +Thread #x is the program's root thread + +Thread #x's call to sem_init failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: sem_init@* (hg_intercepts.c:...) + by 0x........: main (tc18_semabuse.c:23) + +Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post + at 0x........: sem_wait_WRK (hg_intercepts.c:...) + by 0x........: sem_wait (hg_intercepts.c:...) + by 0x........: main (tc18_semabuse.c:34) + +Thread #x's call to sem_post failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: sem_post_WRK (hg_intercepts.c:...) + by 0x........: sem_post (hg_intercepts.c:...) + by 0x........: main (tc18_semabuse.c:37) + +ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc18_semabuse.stdout.exp b/helgrind/tests/tc18_semabuse.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc18_semabuse.stdout.exp diff --git a/helgrind/tests/tc18_semabuse.vgtest b/helgrind/tests/tc18_semabuse.vgtest new file mode 100644 index 0000000..fe4d22b --- /dev/null +++ b/helgrind/tests/tc18_semabuse.vgtest @@ -0,0 +1 @@ +prog: tc18_semabuse diff --git a/helgrind/tests/tc19_shadowmem.c b/helgrind/tests/tc19_shadowmem.c new file mode 100644 index 0000000..ec05061 --- /dev/null +++ b/helgrind/tests/tc19_shadowmem.c @@ -0,0 +1,2291 @@ + +#include <pthread.h> +#include <assert.h> +#include <stdlib.h> +#include <stdio.h> + +#include "helgrind/helgrind.h" + +typedef + struct { + void* (*child)(void*); + char* arr; + int firstoff; + int lastoff; + int skipoff; + } + Info; + +pthread_mutex_t mx; + +void* child8 ( void* infoV ) +{ + int r, i, firstoff, lastoff, skipoff; + char* arr; + Info* info = (Info*)infoV; + firstoff = info->firstoff; + lastoff = info->lastoff; + skipoff = info->skipoff; + arr = info->arr; + assert( sizeof(char) == 1 ); + assert( info->child == &child8 ); + { char* ptr = (char*)&arr[skipoff]; + *ptr = 0; } + for (i = firstoff; i <= lastoff; i += 1) { + char* ptr = (char*)&arr[i]; + if (i != skipoff) { + r= pthread_mutex_lock( &mx ); assert(!r); + *ptr = 0; + r= pthread_mutex_unlock( &mx ); assert(!r); + } + } + return NULL; +} + +void* child16 ( void* infoV ) +{ + int r, i, firstoff, lastoff, skipoff; + char* arr; + Info* info = (Info*)infoV; + firstoff = info->firstoff; + lastoff = info->lastoff; + skipoff = info->skipoff; + arr = info->arr; + assert( sizeof(short) == 2 ); + assert( info->child == &child16 ); + { short* ptr = (short*)&arr[skipoff]; + *ptr = 0; } + for (i = firstoff; i <= lastoff; i += 2) { + short* ptr = (short*)&arr[i]; + if (i != skipoff) { + r= pthread_mutex_lock( &mx ); assert(!r); + *ptr = 0; + r= pthread_mutex_unlock( &mx ); assert(!r); + } + } + return NULL; +} + +void* child32 ( void* infoV ) +{ + int r, i, firstoff, lastoff, skipoff; + char* arr; + Info* info = (Info*)infoV; + firstoff = info->firstoff; + lastoff = info->lastoff; + skipoff = info->skipoff; + arr = info->arr; + assert( sizeof(int) == 4 ); + assert( info->child == &child32 ); + { int* ptr = (int*)&arr[skipoff]; + *ptr = 0; } + for (i = firstoff; i <= lastoff; i += 4) { + int* ptr = (int*)&arr[i]; + if (i != skipoff) { + r= pthread_mutex_lock( &mx ); assert(!r); + *ptr = 0; + r= pthread_mutex_unlock( &mx ); assert(!r); + } + } + return NULL; +} + +void* child64 ( void* infoV ) +{ + int r, i, firstoff, lastoff, skipoff; + char* arr; + Info* info = (Info*)infoV; + firstoff = info->firstoff; + lastoff = info->lastoff; + skipoff = info->skipoff; + arr = info->arr; + assert( sizeof(double) == 8 ); + assert( info->child == &child64 ); + { double* ptr = (double*)&arr[skipoff]; + *ptr = 0.0; } + for (i = firstoff; i <= lastoff; i += 8) { + double* ptr = (double*)&arr[i]; + if (i != skipoff) { + r= pthread_mutex_lock( &mx ); assert(!r); + *ptr = 0.0; + r= pthread_mutex_unlock( &mx ); assert(!r); + } + } + return NULL; +} + + +void* steer ( void* infoV ); + +#define MAXXX 100 /* re 100: should cover at least 2 cycles +of length 1 << N_LINE_BITS */ +/* This is all a bit subtle. First, after every inner loop over the + data, we have to VALGRIND_TC_CLEAN_MEMORY it to get it back to a + decent starting state. Because info.arr is 8-aligned (is asserted + for), the address range painter will paint at top level granularity + (8-byte), which means we are guaranteed to see any errors from the + next iteration at the maximum granularity that their alignment + allows. + + Also, the pthread_joins cause the shadow mem cache to be flushed + each iteration. Given that all trees are pulled up to 64-bit by + the abovementioned VALGRIND_TC_CLEAN_MEMORY, I think this + irrelevant. +*/ + +int main ( void ) +{ + pthread_t t1, t2; + Info info; + int off; + + pthread_mutex_init( &mx, NULL ); + + info.arr = malloc(MAXXX); + assert(info.arr); + + /* ensure array is 8-aligned. this is important, as per comment + above. */ + assert(0 == (7 & (unsigned long)info.arr)); + +#if 1 + /* Test 8 bit granularity */ + + fprintf(stderr, "\n"); + fprintf(stderr, + "===========================================================\n"); + fprintf(stderr, + "=== 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 ===\n"); + fprintf(stderr, + "===========================================================\n"); + fprintf(stderr, "\n"); + for (off = 0; off < MAXXX-1; off++) { + + info.firstoff = off & 0; + info.lastoff = MAXXX - 1; + info.skipoff = off; + info.child = child8; + + fprintf(stderr, "---------- char gran, %d .. %d, skip %d ----------\n", + info.firstoff, info.lastoff, info.skipoff ); + + pthread_create( &t1, NULL, steer, (void*)&info ); + pthread_create( &t2, NULL, steer, (void*)&info ); + + pthread_join( t1, NULL ); + pthread_join( t2, NULL ); + + VALGRIND_HG_CLEAN_MEMORY(&info.arr[0], MAXXX); + + } +#endif +#if 1 + /* Test 16 bit granularity */ + + fprintf(stderr, "\n"); + fprintf(stderr, + "==========================================================\n"); + fprintf(stderr, + "=== 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 ===\n"); + fprintf(stderr, + "==========================================================\n"); + fprintf(stderr, "\n"); + for (off = 0; off < MAXXX-2; off++) { + + info.firstoff = off & 1; + info.lastoff = MAXXX - 2; + info.skipoff = off; + info.child = child16; + + fprintf(stderr, "---------- short gran, %d .. %d, skip %d ----------\n", + info.firstoff, info.lastoff, info.skipoff ); + + pthread_create( &t1, NULL, steer, (void*)&info ); + pthread_create( &t2, NULL, steer, (void*)&info ); + + pthread_join( t1, NULL ); + pthread_join( t2, NULL ); + + VALGRIND_HG_CLEAN_MEMORY(&info.arr[0], MAXXX); + + } +#endif +#if 1 + /* Test 32 bit granularity */ + + fprintf(stderr, "\n"); + fprintf(stderr, + "==========================================================\n"); + fprintf(stderr, + "=== 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 ===\n"); + fprintf(stderr, + "==========================================================\n"); + fprintf(stderr, "\n"); + for (off = 0; off < MAXXX-4; off++) { + + info.firstoff = off & 3; + info.lastoff = MAXXX - 4; + info.skipoff = off; + info.child = child32; + + fprintf(stderr, "---------- int gran, %d .. %d, skip %d ----------\n", + info.firstoff, info.lastoff, info.skipoff ); + + pthread_create( &t1, NULL, steer, (void*)&info ); + pthread_create( &t2, NULL, steer, (void*)&info ); + + pthread_join( t1, NULL ); + pthread_join( t2, NULL ); + + VALGRIND_HG_CLEAN_MEMORY(&info.arr[0], MAXXX); + + } +#endif +#if 1 + /* Test 64 bit granularity */ + + fprintf(stderr, "\n"); + fprintf(stderr, + "==========================================================\n"); + fprintf(stderr, + "=== 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 ===\n"); + fprintf(stderr, + "==========================================================\n"); + fprintf(stderr, "\n"); + for (off = 0; off < MAXXX-8; off++) { + + info.firstoff = off & 7; + info.lastoff = MAXXX - 8; + info.skipoff = off; + info.child = child64; + + fprintf(stderr, "---------- double gran, %d .. %d, skip %d ----------\n", + info.firstoff, info.lastoff, info.skipoff ); + + pthread_create( &t1, NULL, steer, (void*)&info ); + pthread_create( &t2, NULL, steer, (void*)&info ); + + pthread_join( t1, NULL ); + pthread_join( t2, NULL ); + + VALGRIND_HG_CLEAN_MEMORY(&info.arr[0], MAXXX); + + } +#endif + free(info.arr); + + return 0; +} + +void* steer ( void* infoV ) +{ + Info* info = (Info*)infoV; + int wot = info->skipoff; + void*(*fn)(void*) = info->child; + if (wot >= 500) goto halfway; + + __asm__ __volatile__(""); + if (wot == 0) return fn(info); + __asm__ __volatile__(""); + if (wot == 1) return fn(info); + __asm__ __volatile__(""); + if (wot == 2) return fn(info); + __asm__ __volatile__(""); + if (wot == 3) return fn(info); + __asm__ __volatile__(""); + if (wot == 4) return fn(info); + __asm__ __volatile__(""); + if (wot == 5) return fn(info); + __asm__ __volatile__(""); + if (wot == 6) return fn(info); + __asm__ __volatile__(""); + if (wot == 7) return fn(info); + __asm__ __volatile__(""); + if (wot == 8) return fn(info); + __asm__ __volatile__(""); + if (wot == 9) return fn(info); + __asm__ __volatile__(""); + if (wot == 10) return fn(info); + __asm__ __volatile__(""); + if (wot == 11) return fn(info); + __asm__ __volatile__(""); + if (wot == 12) return fn(info); + __asm__ __volatile__(""); + if (wot == 13) return fn(info); + __asm__ __volatile__(""); + if (wot == 14) return fn(info); + __asm__ __volatile__(""); + if (wot == 15) return fn(info); + __asm__ __volatile__(""); + if (wot == 16) return fn(info); + __asm__ __volatile__(""); + if (wot == 17) return fn(info); + __asm__ __volatile__(""); + if (wot == 18) return fn(info); + __asm__ __volatile__(""); + if (wot == 19) return fn(info); + __asm__ __volatile__(""); + if (wot == 20) return fn(info); + __asm__ __volatile__(""); + if (wot == 21) return fn(info); + __asm__ __volatile__(""); + if (wot == 22) return fn(info); + __asm__ __volatile__(""); + if (wot == 23) return fn(info); + __asm__ __volatile__(""); + if (wot == 24) return fn(info); + __asm__ __volatile__(""); + if (wot == 25) return fn(info); + __asm__ __volatile__(""); + if (wot == 26) return fn(info); + __asm__ __volatile__(""); + if (wot == 27) return fn(info); + __asm__ __volatile__(""); + if (wot == 28) return fn(info); + __asm__ __volatile__(""); + if (wot == 29) return fn(info); + __asm__ __volatile__(""); + if (wot == 30) return fn(info); + __asm__ __volatile__(""); + if (wot == 31) return fn(info); + __asm__ __volatile__(""); + if (wot == 32) return fn(info); + __asm__ __volatile__(""); + if (wot == 33) return fn(info); + __asm__ __volatile__(""); + if (wot == 34) return fn(info); + __asm__ __volatile__(""); + if (wot == 35) return fn(info); + __asm__ __volatile__(""); + if (wot == 36) return fn(info); + __asm__ __volatile__(""); + if (wot == 37) return fn(info); + __asm__ __volatile__(""); + if (wot == 38) return fn(info); + __asm__ __volatile__(""); + if (wot == 39) return fn(info); + __asm__ __volatile__(""); + if (wot == 40) return fn(info); + __asm__ __volatile__(""); + if (wot == 41) return fn(info); + __asm__ __volatile__(""); + if (wot == 42) return fn(info); + __asm__ __volatile__(""); + if (wot == 43) return fn(info); + __asm__ __volatile__(""); + if (wot == 44) return fn(info); + __asm__ __volatile__(""); + if (wot == 45) return fn(info); + __asm__ __volatile__(""); + if (wot == 46) return fn(info); + __asm__ __volatile__(""); + if (wot == 47) return fn(info); + __asm__ __volatile__(""); + if (wot == 48) return fn(info); + __asm__ __volatile__(""); + if (wot == 49) return fn(info); + __asm__ __volatile__(""); + if (wot == 50) return fn(info); + __asm__ __volatile__(""); + if (wot == 51) return fn(info); + __asm__ __volatile__(""); + if (wot == 52) return fn(info); + __asm__ __volatile__(""); + if (wot == 53) return fn(info); + __asm__ __volatile__(""); + if (wot == 54) return fn(info); + __asm__ __volatile__(""); + if (wot == 55) return fn(info); + __asm__ __volatile__(""); + if (wot == 56) return fn(info); + __asm__ __volatile__(""); + if (wot == 57) return fn(info); + __asm__ __volatile__(""); + if (wot == 58) return fn(info); + __asm__ __volatile__(""); + if (wot == 59) return fn(info); + __asm__ __volatile__(""); + if (wot == 60) return fn(info); + __asm__ __volatile__(""); + if (wot == 61) return fn(info); + __asm__ __volatile__(""); + if (wot == 62) return fn(info); + __asm__ __volatile__(""); + if (wot == 63) return fn(info); + __asm__ __volatile__(""); + if (wot == 64) return fn(info); + __asm__ __volatile__(""); + if (wot == 65) return fn(info); + __asm__ __volatile__(""); + if (wot == 66) return fn(info); + __asm__ __volatile__(""); + if (wot == 67) return fn(info); + __asm__ __volatile__(""); + if (wot == 68) return fn(info); + __asm__ __volatile__(""); + if (wot == 69) return fn(info); + __asm__ __volatile__(""); + if (wot == 70) return fn(info); + __asm__ __volatile__(""); + if (wot == 71) return fn(info); + __asm__ __volatile__(""); + if (wot == 72) return fn(info); + __asm__ __volatile__(""); + if (wot == 73) return fn(info); + __asm__ __volatile__(""); + if (wot == 74) return fn(info); + __asm__ __volatile__(""); + if (wot == 75) return fn(info); + __asm__ __volatile__(""); + if (wot == 76) return fn(info); + __asm__ __volatile__(""); + if (wot == 77) return fn(info); + __asm__ __volatile__(""); + if (wot == 78) return fn(info); + __asm__ __volatile__(""); + if (wot == 79) return fn(info); + __asm__ __volatile__(""); + if (wot == 80) return fn(info); + __asm__ __volatile__(""); + if (wot == 81) return fn(info); + __asm__ __volatile__(""); + if (wot == 82) return fn(info); + __asm__ __volatile__(""); + if (wot == 83) return fn(info); + __asm__ __volatile__(""); + if (wot == 84) return fn(info); + __asm__ __volatile__(""); + if (wot == 85) return fn(info); + __asm__ __volatile__(""); + if (wot == 86) return fn(info); + __asm__ __volatile__(""); + if (wot == 87) return fn(info); + __asm__ __volatile__(""); + if (wot == 88) return fn(info); + __asm__ __volatile__(""); + if (wot == 89) return fn(info); + __asm__ __volatile__(""); + if (wot == 90) return fn(info); + __asm__ __volatile__(""); + if (wot == 91) return fn(info); + __asm__ __volatile__(""); + if (wot == 92) return fn(info); + __asm__ __volatile__(""); + if (wot == 93) return fn(info); + __asm__ __volatile__(""); + if (wot == 94) return fn(info); + __asm__ __volatile__(""); + if (wot == 95) return fn(info); + __asm__ __volatile__(""); + if (wot == 96) return fn(info); + __asm__ __volatile__(""); + if (wot == 97) return fn(info); + __asm__ __volatile__(""); + if (wot == 98) return fn(info); + __asm__ __volatile__(""); + if (wot == 99) return fn(info); + __asm__ __volatile__(""); + if (wot == 100) return fn(info); + __asm__ __volatile__(""); + if (wot == 101) return fn(info); + __asm__ __volatile__(""); + if (wot == 102) return fn(info); + __asm__ __volatile__(""); + if (wot == 103) return fn(info); + __asm__ __volatile__(""); + if (wot == 104) return fn(info); + __asm__ __volatile__(""); + if (wot == 105) return fn(info); + __asm__ __volatile__(""); + if (wot == 106) return fn(info); + __asm__ __volatile__(""); + if (wot == 107) return fn(info); + __asm__ __volatile__(""); + if (wot == 108) return fn(info); + __asm__ __volatile__(""); + if (wot == 109) return fn(info); + __asm__ __volatile__(""); + if (wot == 110) return fn(info); + __asm__ __volatile__(""); + if (wot == 111) return fn(info); + __asm__ __volatile__(""); + if (wot == 112) return fn(info); + __asm__ __volatile__(""); + if (wot == 113) return fn(info); + __asm__ __volatile__(""); + if (wot == 114) return fn(info); + __asm__ __volatile__(""); + if (wot == 115) return fn(info); + __asm__ __volatile__(""); + if (wot == 116) return fn(info); + __asm__ __volatile__(""); + if (wot == 117) return fn(info); + __asm__ __volatile__(""); + if (wot == 118) return fn(info); + __asm__ __volatile__(""); + if (wot == 119) return fn(info); + __asm__ __volatile__(""); + if (wot == 120) return fn(info); + __asm__ __volatile__(""); + if (wot == 121) return fn(info); + __asm__ __volatile__(""); + if (wot == 122) return fn(info); + __asm__ __volatile__(""); + if (wot == 123) return fn(info); + __asm__ __volatile__(""); + if (wot == 124) return fn(info); + __asm__ __volatile__(""); + if (wot == 125) return fn(info); + __asm__ __volatile__(""); + if (wot == 126) return fn(info); + __asm__ __volatile__(""); + if (wot == 127) return fn(info); + __asm__ __volatile__(""); + if (wot == 128) return fn(info); + __asm__ __volatile__(""); + if (wot == 129) return fn(info); + __asm__ __volatile__(""); + if (wot == 130) return fn(info); + __asm__ __volatile__(""); + if (wot == 131) return fn(info); + __asm__ __volatile__(""); + if (wot == 132) return fn(info); + __asm__ __volatile__(""); + if (wot == 133) return fn(info); + __asm__ __volatile__(""); + if (wot == 134) return fn(info); + __asm__ __volatile__(""); + if (wot == 135) return fn(info); + __asm__ __volatile__(""); + if (wot == 136) return fn(info); + __asm__ __volatile__(""); + if (wot == 137) return fn(info); + __asm__ __volatile__(""); + if (wot == 138) return fn(info); + __asm__ __volatile__(""); + if (wot == 139) return fn(info); + __asm__ __volatile__(""); + if (wot == 140) return fn(info); + __asm__ __volatile__(""); + if (wot == 141) return fn(info); + __asm__ __volatile__(""); + if (wot == 142) return fn(info); + __asm__ __volatile__(""); + if (wot == 143) return fn(info); + __asm__ __volatile__(""); + if (wot == 144) return fn(info); + __asm__ __volatile__(""); + if (wot == 145) return fn(info); + __asm__ __volatile__(""); + if (wot == 146) return fn(info); + __asm__ __volatile__(""); + if (wot == 147) return fn(info); + __asm__ __volatile__(""); + if (wot == 148) return fn(info); + __asm__ __volatile__(""); + if (wot == 149) return fn(info); + __asm__ __volatile__(""); + if (wot == 150) return fn(info); + __asm__ __volatile__(""); + if (wot == 151) return fn(info); + __asm__ __volatile__(""); + if (wot == 152) return fn(info); + __asm__ __volatile__(""); + if (wot == 153) return fn(info); + __asm__ __volatile__(""); + if (wot == 154) return fn(info); + __asm__ __volatile__(""); + if (wot == 155) return fn(info); + __asm__ __volatile__(""); + if (wot == 156) return fn(info); + __asm__ __volatile__(""); + if (wot == 157) return fn(info); + __asm__ __volatile__(""); + if (wot == 158) return fn(info); + __asm__ __volatile__(""); + if (wot == 159) return fn(info); + __asm__ __volatile__(""); + if (wot == 160) return fn(info); + __asm__ __volatile__(""); + if (wot == 161) return fn(info); + __asm__ __volatile__(""); + if (wot == 162) return fn(info); + __asm__ __volatile__(""); + if (wot == 163) return fn(info); + __asm__ __volatile__(""); + if (wot == 164) return fn(info); + __asm__ __volatile__(""); + if (wot == 165) return fn(info); + __asm__ __volatile__(""); + if (wot == 166) return fn(info); + __asm__ __volatile__(""); + if (wot == 167) return fn(info); + __asm__ __volatile__(""); + if (wot == 168) return fn(info); + __asm__ __volatile__(""); + if (wot == 169) return fn(info); + __asm__ __volatile__(""); + if (wot == 170) return fn(info); + __asm__ __volatile__(""); + if (wot == 171) return fn(info); + __asm__ __volatile__(""); + if (wot == 172) return fn(info); + __asm__ __volatile__(""); + if (wot == 173) return fn(info); + __asm__ __volatile__(""); + if (wot == 174) return fn(info); + __asm__ __volatile__(""); + if (wot == 175) return fn(info); + __asm__ __volatile__(""); + if (wot == 176) return fn(info); + __asm__ __volatile__(""); + if (wot == 177) return fn(info); + __asm__ __volatile__(""); + if (wot == 178) return fn(info); + __asm__ __volatile__(""); + if (wot == 179) return fn(info); + __asm__ __volatile__(""); + if (wot == 180) return fn(info); + __asm__ __volatile__(""); + if (wot == 181) return fn(info); + __asm__ __volatile__(""); + if (wot == 182) return fn(info); + __asm__ __volatile__(""); + if (wot == 183) return fn(info); + __asm__ __volatile__(""); + if (wot == 184) return fn(info); + __asm__ __volatile__(""); + if (wot == 185) return fn(info); + __asm__ __volatile__(""); + if (wot == 186) return fn(info); + __asm__ __volatile__(""); + if (wot == 187) return fn(info); + __asm__ __volatile__(""); + if (wot == 188) return fn(info); + __asm__ __volatile__(""); + if (wot == 189) return fn(info); + __asm__ __volatile__(""); + if (wot == 190) return fn(info); + __asm__ __volatile__(""); + if (wot == 191) return fn(info); + __asm__ __volatile__(""); + if (wot == 192) return fn(info); + __asm__ __volatile__(""); + if (wot == 193) return fn(info); + __asm__ __volatile__(""); + if (wot == 194) return fn(info); + __asm__ __volatile__(""); + if (wot == 195) return fn(info); + __asm__ __volatile__(""); + if (wot == 196) return fn(info); + __asm__ __volatile__(""); + if (wot == 197) return fn(info); + __asm__ __volatile__(""); + if (wot == 198) return fn(info); + __asm__ __volatile__(""); + if (wot == 199) return fn(info); + __asm__ __volatile__(""); + if (wot == 200) return fn(info); + __asm__ __volatile__(""); + if (wot == 201) return fn(info); + __asm__ __volatile__(""); + if (wot == 202) return fn(info); + __asm__ __volatile__(""); + if (wot == 203) return fn(info); + __asm__ __volatile__(""); + if (wot == 204) return fn(info); + __asm__ __volatile__(""); + if (wot == 205) return fn(info); + __asm__ __volatile__(""); + if (wot == 206) return fn(info); + __asm__ __volatile__(""); + if (wot == 207) return fn(info); + __asm__ __volatile__(""); + if (wot == 208) return fn(info); + __asm__ __volatile__(""); + if (wot == 209) return fn(info); + __asm__ __volatile__(""); + if (wot == 210) return fn(info); + __asm__ __volatile__(""); + if (wot == 211) return fn(info); + __asm__ __volatile__(""); + if (wot == 212) return fn(info); + __asm__ __volatile__(""); + if (wot == 213) return fn(info); + __asm__ __volatile__(""); + if (wot == 214) return fn(info); + __asm__ __volatile__(""); + if (wot == 215) return fn(info); + __asm__ __volatile__(""); + if (wot == 216) return fn(info); + __asm__ __volatile__(""); + if (wot == 217) return fn(info); + __asm__ __volatile__(""); + if (wot == 218) return fn(info); + __asm__ __volatile__(""); + if (wot == 219) return fn(info); + __asm__ __volatile__(""); + if (wot == 220) return fn(info); + __asm__ __volatile__(""); + if (wot == 221) return fn(info); + __asm__ __volatile__(""); + if (wot == 222) return fn(info); + __asm__ __volatile__(""); + if (wot == 223) return fn(info); + __asm__ __volatile__(""); + if (wot == 224) return fn(info); + __asm__ __volatile__(""); + if (wot == 225) return fn(info); + __asm__ __volatile__(""); + if (wot == 226) return fn(info); + __asm__ __volatile__(""); + if (wot == 227) return fn(info); + __asm__ __volatile__(""); + if (wot == 228) return fn(info); + __asm__ __volatile__(""); + if (wot == 229) return fn(info); + __asm__ __volatile__(""); + if (wot == 230) return fn(info); + __asm__ __volatile__(""); + if (wot == 231) return fn(info); + __asm__ __volatile__(""); + if (wot == 232) return fn(info); + __asm__ __volatile__(""); + if (wot == 233) return fn(info); + __asm__ __volatile__(""); + if (wot == 234) return fn(info); + __asm__ __volatile__(""); + if (wot == 235) return fn(info); + __asm__ __volatile__(""); + if (wot == 236) return fn(info); + __asm__ __volatile__(""); + if (wot == 237) return fn(info); + __asm__ __volatile__(""); + if (wot == 238) return fn(info); + __asm__ __volatile__(""); + if (wot == 239) return fn(info); + __asm__ __volatile__(""); + if (wot == 240) return fn(info); + __asm__ __volatile__(""); + if (wot == 241) return fn(info); + __asm__ __volatile__(""); + if (wot == 242) return fn(info); + __asm__ __volatile__(""); + if (wot == 243) return fn(info); + __asm__ __volatile__(""); + if (wot == 244) return fn(info); + __asm__ __volatile__(""); + if (wot == 245) return fn(info); + __asm__ __volatile__(""); + if (wot == 246) return fn(info); + __asm__ __volatile__(""); + if (wot == 247) return fn(info); + __asm__ __volatile__(""); + if (wot == 248) return fn(info); + __asm__ __volatile__(""); + if (wot == 249) return fn(info); + __asm__ __volatile__(""); + if (wot == 250) return fn(info); + __asm__ __volatile__(""); + if (wot == 251) return fn(info); + __asm__ __volatile__(""); + if (wot == 252) return fn(info); + __asm__ __volatile__(""); + if (wot == 253) return fn(info); + __asm__ __volatile__(""); + if (wot == 254) return fn(info); + __asm__ __volatile__(""); + if (wot == 255) return fn(info); + __asm__ __volatile__(""); + if (wot == 256) return fn(info); + __asm__ __volatile__(""); + if (wot == 257) return fn(info); + __asm__ __volatile__(""); + if (wot == 258) return fn(info); + __asm__ __volatile__(""); + if (wot == 259) return fn(info); + __asm__ __volatile__(""); + if (wot == 260) return fn(info); + __asm__ __volatile__(""); + if (wot == 261) return fn(info); + __asm__ __volatile__(""); + if (wot == 262) return fn(info); + __asm__ __volatile__(""); + if (wot == 263) return fn(info); + __asm__ __volatile__(""); + if (wot == 264) return fn(info); + __asm__ __volatile__(""); + if (wot == 265) return fn(info); + __asm__ __volatile__(""); + if (wot == 266) return fn(info); + __asm__ __volatile__(""); + if (wot == 267) return fn(info); + __asm__ __volatile__(""); + if (wot == 268) return fn(info); + __asm__ __volatile__(""); + if (wot == 269) return fn(info); + __asm__ __volatile__(""); + if (wot == 270) return fn(info); + __asm__ __volatile__(""); + if (wot == 271) return fn(info); + __asm__ __volatile__(""); + if (wot == 272) return fn(info); + __asm__ __volatile__(""); + if (wot == 273) return fn(info); + __asm__ __volatile__(""); + if (wot == 274) return fn(info); + __asm__ __volatile__(""); + if (wot == 275) return fn(info); + __asm__ __volatile__(""); + if (wot == 276) return fn(info); + __asm__ __volatile__(""); + if (wot == 277) return fn(info); + __asm__ __volatile__(""); + if (wot == 278) return fn(info); + __asm__ __volatile__(""); + if (wot == 279) return fn(info); + __asm__ __volatile__(""); + if (wot == 280) return fn(info); + __asm__ __volatile__(""); + if (wot == 281) return fn(info); + __asm__ __volatile__(""); + if (wot == 282) return fn(info); + __asm__ __volatile__(""); + if (wot == 283) return fn(info); + __asm__ __volatile__(""); + if (wot == 284) return fn(info); + __asm__ __volatile__(""); + if (wot == 285) return fn(info); + __asm__ __volatile__(""); + if (wot == 286) return fn(info); + __asm__ __volatile__(""); + if (wot == 287) return fn(info); + __asm__ __volatile__(""); + if (wot == 288) return fn(info); + __asm__ __volatile__(""); + if (wot == 289) return fn(info); + __asm__ __volatile__(""); + if (wot == 290) return fn(info); + __asm__ __volatile__(""); + if (wot == 291) return fn(info); + __asm__ __volatile__(""); + if (wot == 292) return fn(info); + __asm__ __volatile__(""); + if (wot == 293) return fn(info); + __asm__ __volatile__(""); + if (wot == 294) return fn(info); + __asm__ __volatile__(""); + if (wot == 295) return fn(info); + __asm__ __volatile__(""); + if (wot == 296) return fn(info); + __asm__ __volatile__(""); + if (wot == 297) return fn(info); + __asm__ __volatile__(""); + if (wot == 298) return fn(info); + __asm__ __volatile__(""); + if (wot == 299) return fn(info); + __asm__ __volatile__(""); + if (wot == 300) return fn(info); + __asm__ __volatile__(""); + if (wot == 301) return fn(info); + __asm__ __volatile__(""); + if (wot == 302) return fn(info); + __asm__ __volatile__(""); + if (wot == 303) return fn(info); + __asm__ __volatile__(""); + if (wot == 304) return fn(info); + __asm__ __volatile__(""); + if (wot == 305) return fn(info); + __asm__ __volatile__(""); + if (wot == 306) return fn(info); + __asm__ __volatile__(""); + if (wot == 307) return fn(info); + __asm__ __volatile__(""); + if (wot == 308) return fn(info); + __asm__ __volatile__(""); + if (wot == 309) return fn(info); + __asm__ __volatile__(""); + if (wot == 310) return fn(info); + __asm__ __volatile__(""); + if (wot == 311) return fn(info); + __asm__ __volatile__(""); + if (wot == 312) return fn(info); + __asm__ __volatile__(""); + if (wot == 313) return fn(info); + __asm__ __volatile__(""); + if (wot == 314) return fn(info); + __asm__ __volatile__(""); + if (wot == 315) return fn(info); + __asm__ __volatile__(""); + if (wot == 316) return fn(info); + __asm__ __volatile__(""); + if (wot == 317) return fn(info); + __asm__ __volatile__(""); + if (wot == 318) return fn(info); + __asm__ __volatile__(""); + if (wot == 319) return fn(info); + __asm__ __volatile__(""); + if (wot == 320) return fn(info); + __asm__ __volatile__(""); + if (wot == 321) return fn(info); + __asm__ __volatile__(""); + if (wot == 322) return fn(info); + __asm__ __volatile__(""); + if (wot == 323) return fn(info); + __asm__ __volatile__(""); + if (wot == 324) return fn(info); + __asm__ __volatile__(""); + if (wot == 325) return fn(info); + __asm__ __volatile__(""); + if (wot == 326) return fn(info); + __asm__ __volatile__(""); + if (wot == 327) return fn(info); + __asm__ __volatile__(""); + if (wot == 328) return fn(info); + __asm__ __volatile__(""); + if (wot == 329) return fn(info); + __asm__ __volatile__(""); + if (wot == 330) return fn(info); + __asm__ __volatile__(""); + if (wot == 331) return fn(info); + __asm__ __volatile__(""); + if (wot == 332) return fn(info); + __asm__ __volatile__(""); + if (wot == 333) return fn(info); + __asm__ __volatile__(""); + if (wot == 334) return fn(info); + __asm__ __volatile__(""); + if (wot == 335) return fn(info); + __asm__ __volatile__(""); + if (wot == 336) return fn(info); + __asm__ __volatile__(""); + if (wot == 337) return fn(info); + __asm__ __volatile__(""); + if (wot == 338) return fn(info); + __asm__ __volatile__(""); + if (wot == 339) return fn(info); + __asm__ __volatile__(""); + if (wot == 340) return fn(info); + __asm__ __volatile__(""); + if (wot == 341) return fn(info); + __asm__ __volatile__(""); + if (wot == 342) return fn(info); + __asm__ __volatile__(""); + if (wot == 343) return fn(info); + __asm__ __volatile__(""); + if (wot == 344) return fn(info); + __asm__ __volatile__(""); + if (wot == 345) return fn(info); + __asm__ __volatile__(""); + if (wot == 346) return fn(info); + __asm__ __volatile__(""); + if (wot == 347) return fn(info); + __asm__ __volatile__(""); + if (wot == 348) return fn(info); + __asm__ __volatile__(""); + if (wot == 349) return fn(info); + __asm__ __volatile__(""); + if (wot == 350) return fn(info); + __asm__ __volatile__(""); + if (wot == 351) return fn(info); + __asm__ __volatile__(""); + if (wot == 352) return fn(info); + __asm__ __volatile__(""); + if (wot == 353) return fn(info); + __asm__ __volatile__(""); + if (wot == 354) return fn(info); + __asm__ __volatile__(""); + if (wot == 355) return fn(info); + __asm__ __volatile__(""); + if (wot == 356) return fn(info); + __asm__ __volatile__(""); + if (wot == 357) return fn(info); + __asm__ __volatile__(""); + if (wot == 358) return fn(info); + __asm__ __volatile__(""); + if (wot == 359) return fn(info); + __asm__ __volatile__(""); + if (wot == 360) return fn(info); + __asm__ __volatile__(""); + if (wot == 361) return fn(info); + __asm__ __volatile__(""); + if (wot == 362) return fn(info); + __asm__ __volatile__(""); + if (wot == 363) return fn(info); + __asm__ __volatile__(""); + if (wot == 364) return fn(info); + __asm__ __volatile__(""); + if (wot == 365) return fn(info); + __asm__ __volatile__(""); + if (wot == 366) return fn(info); + __asm__ __volatile__(""); + if (wot == 367) return fn(info); + __asm__ __volatile__(""); + if (wot == 368) return fn(info); + __asm__ __volatile__(""); + if (wot == 369) return fn(info); + __asm__ __volatile__(""); + if (wot == 370) return fn(info); + __asm__ __volatile__(""); + if (wot == 371) return fn(info); + __asm__ __volatile__(""); + if (wot == 372) return fn(info); + __asm__ __volatile__(""); + if (wot == 373) return fn(info); + __asm__ __volatile__(""); + if (wot == 374) return fn(info); + __asm__ __volatile__(""); + if (wot == 375) return fn(info); + __asm__ __volatile__(""); + if (wot == 376) return fn(info); + __asm__ __volatile__(""); + if (wot == 377) return fn(info); + __asm__ __volatile__(""); + if (wot == 378) return fn(info); + __asm__ __volatile__(""); + if (wot == 379) return fn(info); + __asm__ __volatile__(""); + if (wot == 380) return fn(info); + __asm__ __volatile__(""); + if (wot == 381) return fn(info); + __asm__ __volatile__(""); + if (wot == 382) return fn(info); + __asm__ __volatile__(""); + if (wot == 383) return fn(info); + __asm__ __volatile__(""); + if (wot == 384) return fn(info); + __asm__ __volatile__(""); + if (wot == 385) return fn(info); + __asm__ __volatile__(""); + if (wot == 386) return fn(info); + __asm__ __volatile__(""); + if (wot == 387) return fn(info); + __asm__ __volatile__(""); + if (wot == 388) return fn(info); + __asm__ __volatile__(""); + if (wot == 389) return fn(info); + __asm__ __volatile__(""); + if (wot == 390) return fn(info); + __asm__ __volatile__(""); + if (wot == 391) return fn(info); + __asm__ __volatile__(""); + if (wot == 392) return fn(info); + __asm__ __volatile__(""); + if (wot == 393) return fn(info); + __asm__ __volatile__(""); + if (wot == 394) return fn(info); + __asm__ __volatile__(""); + if (wot == 395) return fn(info); + __asm__ __volatile__(""); + if (wot == 396) return fn(info); + __asm__ __volatile__(""); + if (wot == 397) return fn(info); + __asm__ __volatile__(""); + if (wot == 398) return fn(info); + __asm__ __volatile__(""); + if (wot == 399) return fn(info); + __asm__ __volatile__(""); + if (wot == 400) return fn(info); + __asm__ __volatile__(""); + if (wot == 401) return fn(info); + __asm__ __volatile__(""); + if (wot == 402) return fn(info); + __asm__ __volatile__(""); + if (wot == 403) return fn(info); + __asm__ __volatile__(""); + if (wot == 404) return fn(info); + __asm__ __volatile__(""); + if (wot == 405) return fn(info); + __asm__ __volatile__(""); + if (wot == 406) return fn(info); + __asm__ __volatile__(""); + if (wot == 407) return fn(info); + __asm__ __volatile__(""); + if (wot == 408) return fn(info); + __asm__ __volatile__(""); + if (wot == 409) return fn(info); + __asm__ __volatile__(""); + if (wot == 410) return fn(info); + __asm__ __volatile__(""); + if (wot == 411) return fn(info); + __asm__ __volatile__(""); + if (wot == 412) return fn(info); + __asm__ __volatile__(""); + if (wot == 413) return fn(info); + __asm__ __volatile__(""); + if (wot == 414) return fn(info); + __asm__ __volatile__(""); + if (wot == 415) return fn(info); + __asm__ __volatile__(""); + if (wot == 416) return fn(info); + __asm__ __volatile__(""); + if (wot == 417) return fn(info); + __asm__ __volatile__(""); + if (wot == 418) return fn(info); + __asm__ __volatile__(""); + if (wot == 419) return fn(info); + __asm__ __volatile__(""); + if (wot == 420) return fn(info); + __asm__ __volatile__(""); + if (wot == 421) return fn(info); + __asm__ __volatile__(""); + if (wot == 422) return fn(info); + __asm__ __volatile__(""); + if (wot == 423) return fn(info); + __asm__ __volatile__(""); + if (wot == 424) return fn(info); + __asm__ __volatile__(""); + if (wot == 425) return fn(info); + __asm__ __volatile__(""); + if (wot == 426) return fn(info); + __asm__ __volatile__(""); + if (wot == 427) return fn(info); + __asm__ __volatile__(""); + if (wot == 428) return fn(info); + __asm__ __volatile__(""); + if (wot == 429) return fn(info); + __asm__ __volatile__(""); + if (wot == 430) return fn(info); + __asm__ __volatile__(""); + if (wot == 431) return fn(info); + __asm__ __volatile__(""); + if (wot == 432) return fn(info); + __asm__ __volatile__(""); + if (wot == 433) return fn(info); + __asm__ __volatile__(""); + if (wot == 434) return fn(info); + __asm__ __volatile__(""); + if (wot == 435) return fn(info); + __asm__ __volatile__(""); + if (wot == 436) return fn(info); + __asm__ __volatile__(""); + if (wot == 437) return fn(info); + __asm__ __volatile__(""); + if (wot == 438) return fn(info); + __asm__ __volatile__(""); + if (wot == 439) return fn(info); + __asm__ __volatile__(""); + if (wot == 440) return fn(info); + __asm__ __volatile__(""); + if (wot == 441) return fn(info); + __asm__ __volatile__(""); + if (wot == 442) return fn(info); + __asm__ __volatile__(""); + if (wot == 443) return fn(info); + __asm__ __volatile__(""); + if (wot == 444) return fn(info); + __asm__ __volatile__(""); + if (wot == 445) return fn(info); + __asm__ __volatile__(""); + if (wot == 446) return fn(info); + __asm__ __volatile__(""); + if (wot == 447) return fn(info); + __asm__ __volatile__(""); + if (wot == 448) return fn(info); + __asm__ __volatile__(""); + if (wot == 449) return fn(info); + __asm__ __volatile__(""); + if (wot == 450) return fn(info); + __asm__ __volatile__(""); + if (wot == 451) return fn(info); + __asm__ __volatile__(""); + if (wot == 452) return fn(info); + __asm__ __volatile__(""); + if (wot == 453) return fn(info); + __asm__ __volatile__(""); + if (wot == 454) return fn(info); + __asm__ __volatile__(""); + if (wot == 455) return fn(info); + __asm__ __volatile__(""); + if (wot == 456) return fn(info); + __asm__ __volatile__(""); + if (wot == 457) return fn(info); + __asm__ __volatile__(""); + if (wot == 458) return fn(info); + __asm__ __volatile__(""); + if (wot == 459) return fn(info); + __asm__ __volatile__(""); + if (wot == 460) return fn(info); + __asm__ __volatile__(""); + if (wot == 461) return fn(info); + __asm__ __volatile__(""); + if (wot == 462) return fn(info); + __asm__ __volatile__(""); + if (wot == 463) return fn(info); + __asm__ __volatile__(""); + if (wot == 464) return fn(info); + __asm__ __volatile__(""); + if (wot == 465) return fn(info); + __asm__ __volatile__(""); + if (wot == 466) return fn(info); + __asm__ __volatile__(""); + if (wot == 467) return fn(info); + __asm__ __volatile__(""); + if (wot == 468) return fn(info); + __asm__ __volatile__(""); + if (wot == 469) return fn(info); + __asm__ __volatile__(""); + if (wot == 470) return fn(info); + __asm__ __volatile__(""); + if (wot == 471) return fn(info); + __asm__ __volatile__(""); + if (wot == 472) return fn(info); + __asm__ __volatile__(""); + if (wot == 473) return fn(info); + __asm__ __volatile__(""); + if (wot == 474) return fn(info); + __asm__ __volatile__(""); + if (wot == 475) return fn(info); + __asm__ __volatile__(""); + if (wot == 476) return fn(info); + __asm__ __volatile__(""); + if (wot == 477) return fn(info); + __asm__ __volatile__(""); + if (wot == 478) return fn(info); + __asm__ __volatile__(""); + if (wot == 479) return fn(info); + __asm__ __volatile__(""); + if (wot == 480) return fn(info); + __asm__ __volatile__(""); + if (wot == 481) return fn(info); + __asm__ __volatile__(""); + if (wot == 482) return fn(info); + __asm__ __volatile__(""); + if (wot == 483) return fn(info); + __asm__ __volatile__(""); + if (wot == 484) return fn(info); + __asm__ __volatile__(""); + if (wot == 485) return fn(info); + __asm__ __volatile__(""); + if (wot == 486) return fn(info); + __asm__ __volatile__(""); + if (wot == 487) return fn(info); + __asm__ __volatile__(""); + if (wot == 488) return fn(info); + __asm__ __volatile__(""); + if (wot == 489) return fn(info); + __asm__ __volatile__(""); + if (wot == 490) return fn(info); + __asm__ __volatile__(""); + if (wot == 491) return fn(info); + __asm__ __volatile__(""); + if (wot == 492) return fn(info); + __asm__ __volatile__(""); + if (wot == 493) return fn(info); + __asm__ __volatile__(""); + if (wot == 494) return fn(info); + __asm__ __volatile__(""); + if (wot == 495) return fn(info); + __asm__ __volatile__(""); + if (wot == 496) return fn(info); + __asm__ __volatile__(""); + if (wot == 497) return fn(info); + __asm__ __volatile__(""); + if (wot == 498) return fn(info); + __asm__ __volatile__(""); + if (wot == 499) return fn(info); + __asm__ __volatile__(""); + halfway: + if (wot == 500) return fn(info); + __asm__ __volatile__(""); + if (wot == 501) return fn(info); + __asm__ __volatile__(""); + if (wot == 502) return fn(info); + __asm__ __volatile__(""); + if (wot == 503) return fn(info); + __asm__ __volatile__(""); + if (wot == 504) return fn(info); + __asm__ __volatile__(""); + if (wot == 505) return fn(info); + __asm__ __volatile__(""); + if (wot == 506) return fn(info); + __asm__ __volatile__(""); + if (wot == 507) return fn(info); + __asm__ __volatile__(""); + if (wot == 508) return fn(info); + __asm__ __volatile__(""); + if (wot == 509) return fn(info); + __asm__ __volatile__(""); + if (wot == 510) return fn(info); + __asm__ __volatile__(""); + if (wot == 511) return fn(info); + __asm__ __volatile__(""); + if (wot == 512) return fn(info); + __asm__ __volatile__(""); + if (wot == 513) return fn(info); + __asm__ __volatile__(""); + if (wot == 514) return fn(info); + __asm__ __volatile__(""); + if (wot == 515) return fn(info); + __asm__ __volatile__(""); + if (wot == 516) return fn(info); + __asm__ __volatile__(""); + if (wot == 517) return fn(info); + __asm__ __volatile__(""); + if (wot == 518) return fn(info); + __asm__ __volatile__(""); + if (wot == 519) return fn(info); + __asm__ __volatile__(""); + if (wot == 520) return fn(info); + __asm__ __volatile__(""); + if (wot == 521) return fn(info); + __asm__ __volatile__(""); + if (wot == 522) return fn(info); + __asm__ __volatile__(""); + if (wot == 523) return fn(info); + __asm__ __volatile__(""); + if (wot == 524) return fn(info); + __asm__ __volatile__(""); + if (wot == 525) return fn(info); + __asm__ __volatile__(""); + if (wot == 526) return fn(info); + __asm__ __volatile__(""); + if (wot == 527) return fn(info); + __asm__ __volatile__(""); + if (wot == 528) return fn(info); + __asm__ __volatile__(""); + if (wot == 529) return fn(info); + __asm__ __volatile__(""); + if (wot == 530) return fn(info); + __asm__ __volatile__(""); + if (wot == 531) return fn(info); + __asm__ __volatile__(""); + if (wot == 532) return fn(info); + __asm__ __volatile__(""); + if (wot == 533) return fn(info); + __asm__ __volatile__(""); + if (wot == 534) return fn(info); + __asm__ __volatile__(""); + if (wot == 535) return fn(info); + __asm__ __volatile__(""); + if (wot == 536) return fn(info); + __asm__ __volatile__(""); + if (wot == 537) return fn(info); + __asm__ __volatile__(""); + if (wot == 538) return fn(info); + __asm__ __volatile__(""); + if (wot == 539) return fn(info); + __asm__ __volatile__(""); + if (wot == 540) return fn(info); + __asm__ __volatile__(""); + if (wot == 541) return fn(info); + __asm__ __volatile__(""); + if (wot == 542) return fn(info); + __asm__ __volatile__(""); + if (wot == 543) return fn(info); + __asm__ __volatile__(""); + if (wot == 544) return fn(info); + __asm__ __volatile__(""); + if (wot == 545) return fn(info); + __asm__ __volatile__(""); + if (wot == 546) return fn(info); + __asm__ __volatile__(""); + if (wot == 547) return fn(info); + __asm__ __volatile__(""); + if (wot == 548) return fn(info); + __asm__ __volatile__(""); + if (wot == 549) return fn(info); + __asm__ __volatile__(""); + if (wot == 550) return fn(info); + __asm__ __volatile__(""); + if (wot == 551) return fn(info); + __asm__ __volatile__(""); + if (wot == 552) return fn(info); + __asm__ __volatile__(""); + if (wot == 553) return fn(info); + __asm__ __volatile__(""); + if (wot == 554) return fn(info); + __asm__ __volatile__(""); + if (wot == 555) return fn(info); + __asm__ __volatile__(""); + if (wot == 556) return fn(info); + __asm__ __volatile__(""); + if (wot == 557) return fn(info); + __asm__ __volatile__(""); + if (wot == 558) return fn(info); + __asm__ __volatile__(""); + if (wot == 559) return fn(info); + __asm__ __volatile__(""); + if (wot == 560) return fn(info); + __asm__ __volatile__(""); + if (wot == 561) return fn(info); + __asm__ __volatile__(""); + if (wot == 562) return fn(info); + __asm__ __volatile__(""); + if (wot == 563) return fn(info); + __asm__ __volatile__(""); + if (wot == 564) return fn(info); + __asm__ __volatile__(""); + if (wot == 565) return fn(info); + __asm__ __volatile__(""); + if (wot == 566) return fn(info); + __asm__ __volatile__(""); + if (wot == 567) return fn(info); + __asm__ __volatile__(""); + if (wot == 568) return fn(info); + __asm__ __volatile__(""); + if (wot == 569) return fn(info); + __asm__ __volatile__(""); + if (wot == 570) return fn(info); + __asm__ __volatile__(""); + if (wot == 571) return fn(info); + __asm__ __volatile__(""); + if (wot == 572) return fn(info); + __asm__ __volatile__(""); + if (wot == 573) return fn(info); + __asm__ __volatile__(""); + if (wot == 574) return fn(info); + __asm__ __volatile__(""); + if (wot == 575) return fn(info); + __asm__ __volatile__(""); + if (wot == 576) return fn(info); + __asm__ __volatile__(""); + if (wot == 577) return fn(info); + __asm__ __volatile__(""); + if (wot == 578) return fn(info); + __asm__ __volatile__(""); + if (wot == 579) return fn(info); + __asm__ __volatile__(""); + if (wot == 580) return fn(info); + __asm__ __volatile__(""); + if (wot == 581) return fn(info); + __asm__ __volatile__(""); + if (wot == 582) return fn(info); + __asm__ __volatile__(""); + if (wot == 583) return fn(info); + __asm__ __volatile__(""); + if (wot == 584) return fn(info); + __asm__ __volatile__(""); + if (wot == 585) return fn(info); + __asm__ __volatile__(""); + if (wot == 586) return fn(info); + __asm__ __volatile__(""); + if (wot == 587) return fn(info); + __asm__ __volatile__(""); + if (wot == 588) return fn(info); + __asm__ __volatile__(""); + if (wot == 589) return fn(info); + __asm__ __volatile__(""); + if (wot == 590) return fn(info); + __asm__ __volatile__(""); + if (wot == 591) return fn(info); + __asm__ __volatile__(""); + if (wot == 592) return fn(info); + __asm__ __volatile__(""); + if (wot == 593) return fn(info); + __asm__ __volatile__(""); + if (wot == 594) return fn(info); + __asm__ __volatile__(""); + if (wot == 595) return fn(info); + __asm__ __volatile__(""); + if (wot == 596) return fn(info); + __asm__ __volatile__(""); + if (wot == 597) return fn(info); + __asm__ __volatile__(""); + if (wot == 598) return fn(info); + __asm__ __volatile__(""); + if (wot == 599) return fn(info); + __asm__ __volatile__(""); + if (wot == 600) return fn(info); + __asm__ __volatile__(""); + if (wot == 601) return fn(info); + __asm__ __volatile__(""); + if (wot == 602) return fn(info); + __asm__ __volatile__(""); + if (wot == 603) return fn(info); + __asm__ __volatile__(""); + if (wot == 604) return fn(info); + __asm__ __volatile__(""); + if (wot == 605) return fn(info); + __asm__ __volatile__(""); + if (wot == 606) return fn(info); + __asm__ __volatile__(""); + if (wot == 607) return fn(info); + __asm__ __volatile__(""); + if (wot == 608) return fn(info); + __asm__ __volatile__(""); + if (wot == 609) return fn(info); + __asm__ __volatile__(""); + if (wot == 610) return fn(info); + __asm__ __volatile__(""); + if (wot == 611) return fn(info); + __asm__ __volatile__(""); + if (wot == 612) return fn(info); + __asm__ __volatile__(""); + if (wot == 613) return fn(info); + __asm__ __volatile__(""); + if (wot == 614) return fn(info); + __asm__ __volatile__(""); + if (wot == 615) return fn(info); + __asm__ __volatile__(""); + if (wot == 616) return fn(info); + __asm__ __volatile__(""); + if (wot == 617) return fn(info); + __asm__ __volatile__(""); + if (wot == 618) return fn(info); + __asm__ __volatile__(""); + if (wot == 619) return fn(info); + __asm__ __volatile__(""); + if (wot == 620) return fn(info); + __asm__ __volatile__(""); + if (wot == 621) return fn(info); + __asm__ __volatile__(""); + if (wot == 622) return fn(info); + __asm__ __volatile__(""); + if (wot == 623) return fn(info); + __asm__ __volatile__(""); + if (wot == 624) return fn(info); + __asm__ __volatile__(""); + if (wot == 625) return fn(info); + __asm__ __volatile__(""); + if (wot == 626) return fn(info); + __asm__ __volatile__(""); + if (wot == 627) return fn(info); + __asm__ __volatile__(""); + if (wot == 628) return fn(info); + __asm__ __volatile__(""); + if (wot == 629) return fn(info); + __asm__ __volatile__(""); + if (wot == 630) return fn(info); + __asm__ __volatile__(""); + if (wot == 631) return fn(info); + __asm__ __volatile__(""); + if (wot == 632) return fn(info); + __asm__ __volatile__(""); + if (wot == 633) return fn(info); + __asm__ __volatile__(""); + if (wot == 634) return fn(info); + __asm__ __volatile__(""); + if (wot == 635) return fn(info); + __asm__ __volatile__(""); + if (wot == 636) return fn(info); + __asm__ __volatile__(""); + if (wot == 637) return fn(info); + __asm__ __volatile__(""); + if (wot == 638) return fn(info); + __asm__ __volatile__(""); + if (wot == 639) return fn(info); + __asm__ __volatile__(""); + if (wot == 640) return fn(info); + __asm__ __volatile__(""); + if (wot == 641) return fn(info); + __asm__ __volatile__(""); + if (wot == 642) return fn(info); + __asm__ __volatile__(""); + if (wot == 643) return fn(info); + __asm__ __volatile__(""); + if (wot == 644) return fn(info); + __asm__ __volatile__(""); + if (wot == 645) return fn(info); + __asm__ __volatile__(""); + if (wot == 646) return fn(info); + __asm__ __volatile__(""); + if (wot == 647) return fn(info); + __asm__ __volatile__(""); + if (wot == 648) return fn(info); + __asm__ __volatile__(""); + if (wot == 649) return fn(info); + __asm__ __volatile__(""); + if (wot == 650) return fn(info); + __asm__ __volatile__(""); + if (wot == 651) return fn(info); + __asm__ __volatile__(""); + if (wot == 652) return fn(info); + __asm__ __volatile__(""); + if (wot == 653) return fn(info); + __asm__ __volatile__(""); + if (wot == 654) return fn(info); + __asm__ __volatile__(""); + if (wot == 655) return fn(info); + __asm__ __volatile__(""); + if (wot == 656) return fn(info); + __asm__ __volatile__(""); + if (wot == 657) return fn(info); + __asm__ __volatile__(""); + if (wot == 658) return fn(info); + __asm__ __volatile__(""); + if (wot == 659) return fn(info); + __asm__ __volatile__(""); + if (wot == 660) return fn(info); + __asm__ __volatile__(""); + if (wot == 661) return fn(info); + __asm__ __volatile__(""); + if (wot == 662) return fn(info); + __asm__ __volatile__(""); + if (wot == 663) return fn(info); + __asm__ __volatile__(""); + if (wot == 664) return fn(info); + __asm__ __volatile__(""); + if (wot == 665) return fn(info); + __asm__ __volatile__(""); + if (wot == 666) return fn(info); + __asm__ __volatile__(""); + if (wot == 667) return fn(info); + __asm__ __volatile__(""); + if (wot == 668) return fn(info); + __asm__ __volatile__(""); + if (wot == 669) return fn(info); + __asm__ __volatile__(""); + if (wot == 670) return fn(info); + __asm__ __volatile__(""); + if (wot == 671) return fn(info); + __asm__ __volatile__(""); + if (wot == 672) return fn(info); + __asm__ __volatile__(""); + if (wot == 673) return fn(info); + __asm__ __volatile__(""); + if (wot == 674) return fn(info); + __asm__ __volatile__(""); + if (wot == 675) return fn(info); + __asm__ __volatile__(""); + if (wot == 676) return fn(info); + __asm__ __volatile__(""); + if (wot == 677) return fn(info); + __asm__ __volatile__(""); + if (wot == 678) return fn(info); + __asm__ __volatile__(""); + if (wot == 679) return fn(info); + __asm__ __volatile__(""); + if (wot == 680) return fn(info); + __asm__ __volatile__(""); + if (wot == 681) return fn(info); + __asm__ __volatile__(""); + if (wot == 682) return fn(info); + __asm__ __volatile__(""); + if (wot == 683) return fn(info); + __asm__ __volatile__(""); + if (wot == 684) return fn(info); + __asm__ __volatile__(""); + if (wot == 685) return fn(info); + __asm__ __volatile__(""); + if (wot == 686) return fn(info); + __asm__ __volatile__(""); + if (wot == 687) return fn(info); + __asm__ __volatile__(""); + if (wot == 688) return fn(info); + __asm__ __volatile__(""); + if (wot == 689) return fn(info); + __asm__ __volatile__(""); + if (wot == 690) return fn(info); + __asm__ __volatile__(""); + if (wot == 691) return fn(info); + __asm__ __volatile__(""); + if (wot == 692) return fn(info); + __asm__ __volatile__(""); + if (wot == 693) return fn(info); + __asm__ __volatile__(""); + if (wot == 694) return fn(info); + __asm__ __volatile__(""); + if (wot == 695) return fn(info); + __asm__ __volatile__(""); + if (wot == 696) return fn(info); + __asm__ __volatile__(""); + if (wot == 697) return fn(info); + __asm__ __volatile__(""); + if (wot == 698) return fn(info); + __asm__ __volatile__(""); + if (wot == 699) return fn(info); + __asm__ __volatile__(""); + if (wot == 700) return fn(info); + __asm__ __volatile__(""); + if (wot == 701) return fn(info); + __asm__ __volatile__(""); + if (wot == 702) return fn(info); + __asm__ __volatile__(""); + if (wot == 703) return fn(info); + __asm__ __volatile__(""); + if (wot == 704) return fn(info); + __asm__ __volatile__(""); + if (wot == 705) return fn(info); + __asm__ __volatile__(""); + if (wot == 706) return fn(info); + __asm__ __volatile__(""); + if (wot == 707) return fn(info); + __asm__ __volatile__(""); + if (wot == 708) return fn(info); + __asm__ __volatile__(""); + if (wot == 709) return fn(info); + __asm__ __volatile__(""); + if (wot == 710) return fn(info); + __asm__ __volatile__(""); + if (wot == 711) return fn(info); + __asm__ __volatile__(""); + if (wot == 712) return fn(info); + __asm__ __volatile__(""); + if (wot == 713) return fn(info); + __asm__ __volatile__(""); + if (wot == 714) return fn(info); + __asm__ __volatile__(""); + if (wot == 715) return fn(info); + __asm__ __volatile__(""); + if (wot == 716) return fn(info); + __asm__ __volatile__(""); + if (wot == 717) return fn(info); + __asm__ __volatile__(""); + if (wot == 718) return fn(info); + __asm__ __volatile__(""); + if (wot == 719) return fn(info); + __asm__ __volatile__(""); + if (wot == 720) return fn(info); + __asm__ __volatile__(""); + if (wot == 721) return fn(info); + __asm__ __volatile__(""); + if (wot == 722) return fn(info); + __asm__ __volatile__(""); + if (wot == 723) return fn(info); + __asm__ __volatile__(""); + if (wot == 724) return fn(info); + __asm__ __volatile__(""); + if (wot == 725) return fn(info); + __asm__ __volatile__(""); + if (wot == 726) return fn(info); + __asm__ __volatile__(""); + if (wot == 727) return fn(info); + __asm__ __volatile__(""); + if (wot == 728) return fn(info); + __asm__ __volatile__(""); + if (wot == 729) return fn(info); + __asm__ __volatile__(""); + if (wot == 730) return fn(info); + __asm__ __volatile__(""); + if (wot == 731) return fn(info); + __asm__ __volatile__(""); + if (wot == 732) return fn(info); + __asm__ __volatile__(""); + if (wot == 733) return fn(info); + __asm__ __volatile__(""); + if (wot == 734) return fn(info); + __asm__ __volatile__(""); + if (wot == 735) return fn(info); + __asm__ __volatile__(""); + if (wot == 736) return fn(info); + __asm__ __volatile__(""); + if (wot == 737) return fn(info); + __asm__ __volatile__(""); + if (wot == 738) return fn(info); + __asm__ __volatile__(""); + if (wot == 739) return fn(info); + __asm__ __volatile__(""); + if (wot == 740) return fn(info); + __asm__ __volatile__(""); + if (wot == 741) return fn(info); + __asm__ __volatile__(""); + if (wot == 742) return fn(info); + __asm__ __volatile__(""); + if (wot == 743) return fn(info); + __asm__ __volatile__(""); + if (wot == 744) return fn(info); + __asm__ __volatile__(""); + if (wot == 745) return fn(info); + __asm__ __volatile__(""); + if (wot == 746) return fn(info); + __asm__ __volatile__(""); + if (wot == 747) return fn(info); + __asm__ __volatile__(""); + if (wot == 748) return fn(info); + __asm__ __volatile__(""); + if (wot == 749) return fn(info); + __asm__ __volatile__(""); + if (wot == 750) return fn(info); + __asm__ __volatile__(""); + if (wot == 751) return fn(info); + __asm__ __volatile__(""); + if (wot == 752) return fn(info); + __asm__ __volatile__(""); + if (wot == 753) return fn(info); + __asm__ __volatile__(""); + if (wot == 754) return fn(info); + __asm__ __volatile__(""); + if (wot == 755) return fn(info); + __asm__ __volatile__(""); + if (wot == 756) return fn(info); + __asm__ __volatile__(""); + if (wot == 757) return fn(info); + __asm__ __volatile__(""); + if (wot == 758) return fn(info); + __asm__ __volatile__(""); + if (wot == 759) return fn(info); + __asm__ __volatile__(""); + if (wot == 760) return fn(info); + __asm__ __volatile__(""); + if (wot == 761) return fn(info); + __asm__ __volatile__(""); + if (wot == 762) return fn(info); + __asm__ __volatile__(""); + if (wot == 763) return fn(info); + __asm__ __volatile__(""); + if (wot == 764) return fn(info); + __asm__ __volatile__(""); + if (wot == 765) return fn(info); + __asm__ __volatile__(""); + if (wot == 766) return fn(info); + __asm__ __volatile__(""); + if (wot == 767) return fn(info); + __asm__ __volatile__(""); + if (wot == 768) return fn(info); + __asm__ __volatile__(""); + if (wot == 769) return fn(info); + __asm__ __volatile__(""); + if (wot == 770) return fn(info); + __asm__ __volatile__(""); + if (wot == 771) return fn(info); + __asm__ __volatile__(""); + if (wot == 772) return fn(info); + __asm__ __volatile__(""); + if (wot == 773) return fn(info); + __asm__ __volatile__(""); + if (wot == 774) return fn(info); + __asm__ __volatile__(""); + if (wot == 775) return fn(info); + __asm__ __volatile__(""); + if (wot == 776) return fn(info); + __asm__ __volatile__(""); + if (wot == 777) return fn(info); + __asm__ __volatile__(""); + if (wot == 778) return fn(info); + __asm__ __volatile__(""); + if (wot == 779) return fn(info); + __asm__ __volatile__(""); + if (wot == 780) return fn(info); + __asm__ __volatile__(""); + if (wot == 781) return fn(info); + __asm__ __volatile__(""); + if (wot == 782) return fn(info); + __asm__ __volatile__(""); + if (wot == 783) return fn(info); + __asm__ __volatile__(""); + if (wot == 784) return fn(info); + __asm__ __volatile__(""); + if (wot == 785) return fn(info); + __asm__ __volatile__(""); + if (wot == 786) return fn(info); + __asm__ __volatile__(""); + if (wot == 787) return fn(info); + __asm__ __volatile__(""); + if (wot == 788) return fn(info); + __asm__ __volatile__(""); + if (wot == 789) return fn(info); + __asm__ __volatile__(""); + if (wot == 790) return fn(info); + __asm__ __volatile__(""); + if (wot == 791) return fn(info); + __asm__ __volatile__(""); + if (wot == 792) return fn(info); + __asm__ __volatile__(""); + if (wot == 793) return fn(info); + __asm__ __volatile__(""); + if (wot == 794) return fn(info); + __asm__ __volatile__(""); + if (wot == 795) return fn(info); + __asm__ __volatile__(""); + if (wot == 796) return fn(info); + __asm__ __volatile__(""); + if (wot == 797) return fn(info); + __asm__ __volatile__(""); + if (wot == 798) return fn(info); + __asm__ __volatile__(""); + if (wot == 799) return fn(info); + __asm__ __volatile__(""); + if (wot == 800) return fn(info); + __asm__ __volatile__(""); + if (wot == 801) return fn(info); + __asm__ __volatile__(""); + if (wot == 802) return fn(info); + __asm__ __volatile__(""); + if (wot == 803) return fn(info); + __asm__ __volatile__(""); + if (wot == 804) return fn(info); + __asm__ __volatile__(""); + if (wot == 805) return fn(info); + __asm__ __volatile__(""); + if (wot == 806) return fn(info); + __asm__ __volatile__(""); + if (wot == 807) return fn(info); + __asm__ __volatile__(""); + if (wot == 808) return fn(info); + __asm__ __volatile__(""); + if (wot == 809) return fn(info); + __asm__ __volatile__(""); + if (wot == 810) return fn(info); + __asm__ __volatile__(""); + if (wot == 811) return fn(info); + __asm__ __volatile__(""); + if (wot == 812) return fn(info); + __asm__ __volatile__(""); + if (wot == 813) return fn(info); + __asm__ __volatile__(""); + if (wot == 814) return fn(info); + __asm__ __volatile__(""); + if (wot == 815) return fn(info); + __asm__ __volatile__(""); + if (wot == 816) return fn(info); + __asm__ __volatile__(""); + if (wot == 817) return fn(info); + __asm__ __volatile__(""); + if (wot == 818) return fn(info); + __asm__ __volatile__(""); + if (wot == 819) return fn(info); + __asm__ __volatile__(""); + if (wot == 820) return fn(info); + __asm__ __volatile__(""); + if (wot == 821) return fn(info); + __asm__ __volatile__(""); + if (wot == 822) return fn(info); + __asm__ __volatile__(""); + if (wot == 823) return fn(info); + __asm__ __volatile__(""); + if (wot == 824) return fn(info); + __asm__ __volatile__(""); + if (wot == 825) return fn(info); + __asm__ __volatile__(""); + if (wot == 826) return fn(info); + __asm__ __volatile__(""); + if (wot == 827) return fn(info); + __asm__ __volatile__(""); + if (wot == 828) return fn(info); + __asm__ __volatile__(""); + if (wot == 829) return fn(info); + __asm__ __volatile__(""); + if (wot == 830) return fn(info); + __asm__ __volatile__(""); + if (wot == 831) return fn(info); + __asm__ __volatile__(""); + if (wot == 832) return fn(info); + __asm__ __volatile__(""); + if (wot == 833) return fn(info); + __asm__ __volatile__(""); + if (wot == 834) return fn(info); + __asm__ __volatile__(""); + if (wot == 835) return fn(info); + __asm__ __volatile__(""); + if (wot == 836) return fn(info); + __asm__ __volatile__(""); + if (wot == 837) return fn(info); + __asm__ __volatile__(""); + if (wot == 838) return fn(info); + __asm__ __volatile__(""); + if (wot == 839) return fn(info); + __asm__ __volatile__(""); + if (wot == 840) return fn(info); + __asm__ __volatile__(""); + if (wot == 841) return fn(info); + __asm__ __volatile__(""); + if (wot == 842) return fn(info); + __asm__ __volatile__(""); + if (wot == 843) return fn(info); + __asm__ __volatile__(""); + if (wot == 844) return fn(info); + __asm__ __volatile__(""); + if (wot == 845) return fn(info); + __asm__ __volatile__(""); + if (wot == 846) return fn(info); + __asm__ __volatile__(""); + if (wot == 847) return fn(info); + __asm__ __volatile__(""); + if (wot == 848) return fn(info); + __asm__ __volatile__(""); + if (wot == 849) return fn(info); + __asm__ __volatile__(""); + if (wot == 850) return fn(info); + __asm__ __volatile__(""); + if (wot == 851) return fn(info); + __asm__ __volatile__(""); + if (wot == 852) return fn(info); + __asm__ __volatile__(""); + if (wot == 853) return fn(info); + __asm__ __volatile__(""); + if (wot == 854) return fn(info); + __asm__ __volatile__(""); + if (wot == 855) return fn(info); + __asm__ __volatile__(""); + if (wot == 856) return fn(info); + __asm__ __volatile__(""); + if (wot == 857) return fn(info); + __asm__ __volatile__(""); + if (wot == 858) return fn(info); + __asm__ __volatile__(""); + if (wot == 859) return fn(info); + __asm__ __volatile__(""); + if (wot == 860) return fn(info); + __asm__ __volatile__(""); + if (wot == 861) return fn(info); + __asm__ __volatile__(""); + if (wot == 862) return fn(info); + __asm__ __volatile__(""); + if (wot == 863) return fn(info); + __asm__ __volatile__(""); + if (wot == 864) return fn(info); + __asm__ __volatile__(""); + if (wot == 865) return fn(info); + __asm__ __volatile__(""); + if (wot == 866) return fn(info); + __asm__ __volatile__(""); + if (wot == 867) return fn(info); + __asm__ __volatile__(""); + if (wot == 868) return fn(info); + __asm__ __volatile__(""); + if (wot == 869) return fn(info); + __asm__ __volatile__(""); + if (wot == 870) return fn(info); + __asm__ __volatile__(""); + if (wot == 871) return fn(info); + __asm__ __volatile__(""); + if (wot == 872) return fn(info); + __asm__ __volatile__(""); + if (wot == 873) return fn(info); + __asm__ __volatile__(""); + if (wot == 874) return fn(info); + __asm__ __volatile__(""); + if (wot == 875) return fn(info); + __asm__ __volatile__(""); + if (wot == 876) return fn(info); + __asm__ __volatile__(""); + if (wot == 877) return fn(info); + __asm__ __volatile__(""); + if (wot == 878) return fn(info); + __asm__ __volatile__(""); + if (wot == 879) return fn(info); + __asm__ __volatile__(""); + if (wot == 880) return fn(info); + __asm__ __volatile__(""); + if (wot == 881) return fn(info); + __asm__ __volatile__(""); + if (wot == 882) return fn(info); + __asm__ __volatile__(""); + if (wot == 883) return fn(info); + __asm__ __volatile__(""); + if (wot == 884) return fn(info); + __asm__ __volatile__(""); + if (wot == 885) return fn(info); + __asm__ __volatile__(""); + if (wot == 886) return fn(info); + __asm__ __volatile__(""); + if (wot == 887) return fn(info); + __asm__ __volatile__(""); + if (wot == 888) return fn(info); + __asm__ __volatile__(""); + if (wot == 889) return fn(info); + __asm__ __volatile__(""); + if (wot == 890) return fn(info); + __asm__ __volatile__(""); + if (wot == 891) return fn(info); + __asm__ __volatile__(""); + if (wot == 892) return fn(info); + __asm__ __volatile__(""); + if (wot == 893) return fn(info); + __asm__ __volatile__(""); + if (wot == 894) return fn(info); + __asm__ __volatile__(""); + if (wot == 895) return fn(info); + __asm__ __volatile__(""); + if (wot == 896) return fn(info); + __asm__ __volatile__(""); + if (wot == 897) return fn(info); + __asm__ __volatile__(""); + if (wot == 898) return fn(info); + __asm__ __volatile__(""); + if (wot == 899) return fn(info); + __asm__ __volatile__(""); + if (wot == 900) return fn(info); + __asm__ __volatile__(""); + if (wot == 901) return fn(info); + __asm__ __volatile__(""); + if (wot == 902) return fn(info); + __asm__ __volatile__(""); + if (wot == 903) return fn(info); + __asm__ __volatile__(""); + if (wot == 904) return fn(info); + __asm__ __volatile__(""); + if (wot == 905) return fn(info); + __asm__ __volatile__(""); + if (wot == 906) return fn(info); + __asm__ __volatile__(""); + if (wot == 907) return fn(info); + __asm__ __volatile__(""); + if (wot == 908) return fn(info); + __asm__ __volatile__(""); + if (wot == 909) return fn(info); + __asm__ __volatile__(""); + if (wot == 910) return fn(info); + __asm__ __volatile__(""); + if (wot == 911) return fn(info); + __asm__ __volatile__(""); + if (wot == 912) return fn(info); + __asm__ __volatile__(""); + if (wot == 913) return fn(info); + __asm__ __volatile__(""); + if (wot == 914) return fn(info); + __asm__ __volatile__(""); + if (wot == 915) return fn(info); + __asm__ __volatile__(""); + if (wot == 916) return fn(info); + __asm__ __volatile__(""); + if (wot == 917) return fn(info); + __asm__ __volatile__(""); + if (wot == 918) return fn(info); + __asm__ __volatile__(""); + if (wot == 919) return fn(info); + __asm__ __volatile__(""); + if (wot == 920) return fn(info); + __asm__ __volatile__(""); + if (wot == 921) return fn(info); + __asm__ __volatile__(""); + if (wot == 922) return fn(info); + __asm__ __volatile__(""); + if (wot == 923) return fn(info); + __asm__ __volatile__(""); + if (wot == 924) return fn(info); + __asm__ __volatile__(""); + if (wot == 925) return fn(info); + __asm__ __volatile__(""); + if (wot == 926) return fn(info); + __asm__ __volatile__(""); + if (wot == 927) return fn(info); + __asm__ __volatile__(""); + if (wot == 928) return fn(info); + __asm__ __volatile__(""); + if (wot == 929) return fn(info); + __asm__ __volatile__(""); + if (wot == 930) return fn(info); + __asm__ __volatile__(""); + if (wot == 931) return fn(info); + __asm__ __volatile__(""); + if (wot == 932) return fn(info); + __asm__ __volatile__(""); + if (wot == 933) return fn(info); + __asm__ __volatile__(""); + if (wot == 934) return fn(info); + __asm__ __volatile__(""); + if (wot == 935) return fn(info); + __asm__ __volatile__(""); + if (wot == 936) return fn(info); + __asm__ __volatile__(""); + if (wot == 937) return fn(info); + __asm__ __volatile__(""); + if (wot == 938) return fn(info); + __asm__ __volatile__(""); + if (wot == 939) return fn(info); + __asm__ __volatile__(""); + if (wot == 940) return fn(info); + __asm__ __volatile__(""); + if (wot == 941) return fn(info); + __asm__ __volatile__(""); + if (wot == 942) return fn(info); + __asm__ __volatile__(""); + if (wot == 943) return fn(info); + __asm__ __volatile__(""); + if (wot == 944) return fn(info); + __asm__ __volatile__(""); + if (wot == 945) return fn(info); + __asm__ __volatile__(""); + if (wot == 946) return fn(info); + __asm__ __volatile__(""); + if (wot == 947) return fn(info); + __asm__ __volatile__(""); + if (wot == 948) return fn(info); + __asm__ __volatile__(""); + if (wot == 949) return fn(info); + __asm__ __volatile__(""); + if (wot == 950) return fn(info); + __asm__ __volatile__(""); + if (wot == 951) return fn(info); + __asm__ __volatile__(""); + if (wot == 952) return fn(info); + __asm__ __volatile__(""); + if (wot == 953) return fn(info); + __asm__ __volatile__(""); + if (wot == 954) return fn(info); + __asm__ __volatile__(""); + if (wot == 955) return fn(info); + __asm__ __volatile__(""); + if (wot == 956) return fn(info); + __asm__ __volatile__(""); + if (wot == 957) return fn(info); + __asm__ __volatile__(""); + if (wot == 958) return fn(info); + __asm__ __volatile__(""); + if (wot == 959) return fn(info); + __asm__ __volatile__(""); + if (wot == 960) return fn(info); + __asm__ __volatile__(""); + if (wot == 961) return fn(info); + __asm__ __volatile__(""); + if (wot == 962) return fn(info); + __asm__ __volatile__(""); + if (wot == 963) return fn(info); + __asm__ __volatile__(""); + if (wot == 964) return fn(info); + __asm__ __volatile__(""); + if (wot == 965) return fn(info); + __asm__ __volatile__(""); + if (wot == 966) return fn(info); + __asm__ __volatile__(""); + if (wot == 967) return fn(info); + __asm__ __volatile__(""); + if (wot == 968) return fn(info); + __asm__ __volatile__(""); + if (wot == 969) return fn(info); + __asm__ __volatile__(""); + if (wot == 970) return fn(info); + __asm__ __volatile__(""); + if (wot == 971) return fn(info); + __asm__ __volatile__(""); + if (wot == 972) return fn(info); + __asm__ __volatile__(""); + if (wot == 973) return fn(info); + __asm__ __volatile__(""); + if (wot == 974) return fn(info); + __asm__ __volatile__(""); + if (wot == 975) return fn(info); + __asm__ __volatile__(""); + if (wot == 976) return fn(info); + __asm__ __volatile__(""); + if (wot == 977) return fn(info); + __asm__ __volatile__(""); + if (wot == 978) return fn(info); + __asm__ __volatile__(""); + if (wot == 979) return fn(info); + __asm__ __volatile__(""); + if (wot == 980) return fn(info); + __asm__ __volatile__(""); + if (wot == 981) return fn(info); + __asm__ __volatile__(""); + if (wot == 982) return fn(info); + __asm__ __volatile__(""); + if (wot == 983) return fn(info); + __asm__ __volatile__(""); + if (wot == 984) return fn(info); + __asm__ __volatile__(""); + if (wot == 985) return fn(info); + __asm__ __volatile__(""); + if (wot == 986) return fn(info); + __asm__ __volatile__(""); + if (wot == 987) return fn(info); + __asm__ __volatile__(""); + if (wot == 988) return fn(info); + __asm__ __volatile__(""); + if (wot == 989) return fn(info); + __asm__ __volatile__(""); + if (wot == 990) return fn(info); + __asm__ __volatile__(""); + if (wot == 991) return fn(info); + __asm__ __volatile__(""); + if (wot == 992) return fn(info); + __asm__ __volatile__(""); + if (wot == 993) return fn(info); + __asm__ __volatile__(""); + if (wot == 994) return fn(info); + __asm__ __volatile__(""); + if (wot == 995) return fn(info); + __asm__ __volatile__(""); + if (wot == 996) return fn(info); + __asm__ __volatile__(""); + if (wot == 997) return fn(info); + __asm__ __volatile__(""); + if (wot == 998) return fn(info); + __asm__ __volatile__(""); + if (wot == 999) return fn(info); + __asm__ __volatile__(""); + assert(0); + return 0; /* keep gcc happy on AIX */ +} diff --git a/helgrind/tests/tc19_shadowmem.stderr.exp b/helgrind/tests/tc19_shadowmem.stderr.exp new file mode 100644 index 0000000..1e580d2 --- /dev/null +++ b/helgrind/tests/tc19_shadowmem.stderr.exp @@ -0,0 +1,15304 @@ + + +=========================================================== +=== 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 === +=========================================================== + +---------- char gran, 0 .. 99, skip 0 ---------- +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 1 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 2 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 3 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 4 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 5 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 6 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 7 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 8 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 9 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 10 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 11 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 12 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 13 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 14 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 15 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 16 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 17 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 18 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 19 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 20 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 21 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 22 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 23 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 24 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 25 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 26 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 27 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 28 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 29 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 30 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 31 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 32 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 33 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 34 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 35 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 36 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 37 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 38 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 39 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 40 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 41 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 42 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 43 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 44 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 45 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 46 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 47 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 48 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 49 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 50 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 51 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 52 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 53 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 54 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 55 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 56 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 57 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 58 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 59 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 60 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 61 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 62 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 63 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 64 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 65 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 66 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 67 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 68 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 69 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 70 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 71 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 72 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 73 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 74 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 75 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 76 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 77 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 78 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 79 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 80 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 81 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 82 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 83 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 84 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 85 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 86 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 87 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 88 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 89 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 90 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 91 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 92 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:472) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:472) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 93 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 94 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 95 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 96 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:480) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:480) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 97 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:482) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:482) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- char gran, 0 .. 99, skip 98 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:173) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:172) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:484) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child8 (tc19_shadowmem.c:33) + by 0x........: steer (tc19_shadowmem.c:484) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +========================================================== +=== 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 === +========================================================== + +---------- short gran, 0 .. 98, skip 0 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +More than 100 errors detected. Subsequent errors +will still be recorded, but in less detail than before. +---------- short gran, 1 .. 98, skip 1 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 2 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 3 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 4 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 5 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 6 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 7 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 8 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 9 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 10 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 11 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 12 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 13 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 14 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 15 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 16 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 17 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 18 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 19 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 20 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 21 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 22 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 23 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 24 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 25 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 26 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 27 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 28 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 29 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 30 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 31 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 32 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 33 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 34 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 35 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 36 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 37 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 38 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 39 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 40 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 41 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 42 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 43 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 44 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 45 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 46 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 47 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 48 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 49 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 50 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 51 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 52 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 53 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 54 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 55 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 56 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 57 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 58 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 59 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 60 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 61 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 62 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 63 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 64 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 65 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 66 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 67 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 68 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 69 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 70 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 71 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 72 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 73 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 74 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 75 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 76 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 77 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 78 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 79 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 80 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 81 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 82 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 83 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 84 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 85 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 86 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 87 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 88 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 89 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 90 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 91 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 92 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:472) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:472) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 93 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 94 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 95 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 0 .. 98, skip 96 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:480) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:480) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- short gran, 1 .. 98, skip 97 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:204) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:203) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:482) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:482) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:482) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child16 (tc19_shadowmem.c:57) + by 0x........: steer (tc19_shadowmem.c:482) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +========================================================== +=== 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 === +========================================================== + +---------- int gran, 0 .. 96, skip 0 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 1 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 2 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 3 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 4 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 5 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 6 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 7 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 8 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 9 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 10 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 11 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 12 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 13 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 14 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 15 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 16 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 17 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 18 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 19 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 20 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 21 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 22 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 23 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 24 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 25 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 26 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 27 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 28 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 29 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 30 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 31 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 32 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 33 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 34 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 35 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 36 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 37 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 38 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 39 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 40 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 41 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 42 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 43 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 44 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 45 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 46 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 47 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 48 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 49 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 50 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 51 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 52 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 53 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 54 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 55 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 56 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 57 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 58 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 59 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 60 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 61 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 62 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 63 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 64 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 65 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 66 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 67 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 68 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 69 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 70 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 71 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 72 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 73 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 74 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 75 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 76 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 77 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 78 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 79 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 80 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 81 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 82 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 83 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 84 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 85 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 86 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 87 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 88 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 89 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 90 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 91 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 0 .. 96, skip 92 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:472) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:472) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 1 .. 96, skip 93 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:474) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 2 .. 96, skip 94 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:476) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- int gran, 3 .. 96, skip 95 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:235) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:234) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child32 (tc19_shadowmem.c:81) + by 0x........: steer (tc19_shadowmem.c:478) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +========================================================== +=== 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 === +========================================================== + +---------- double gran, 0 .. 92, skip 0 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:288) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 1 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:290) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 2 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:292) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 3 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:294) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 4 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:296) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 5 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:298) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 6 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:300) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 7 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:302) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 8 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:304) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 9 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:306) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 10 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:308) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 11 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:310) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 12 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:312) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 13 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:314) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 14 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:316) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 15 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:318) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 16 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:320) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 17 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:322) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 18 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:324) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 19 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:326) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 20 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:328) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 21 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:330) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 22 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:332) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 23 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:334) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 24 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:336) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 25 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:338) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 26 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:340) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 27 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:342) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 28 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:344) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 29 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:346) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 30 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:348) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 31 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:350) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 32 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:352) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 33 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:354) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 34 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:356) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 35 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:358) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 36 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:360) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 37 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:362) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 38 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:364) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 39 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:366) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 40 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:368) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 41 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:370) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 42 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:372) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 43 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:374) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 44 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:376) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 45 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:378) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 46 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:380) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 47 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:382) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 48 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:384) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 49 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:386) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 50 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:388) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 51 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:390) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 52 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:392) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 53 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:394) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 54 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:396) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 55 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:398) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 56 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:400) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 57 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:402) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 58 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:404) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 59 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:406) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 60 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:408) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 61 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:410) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 62 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:412) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 63 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:414) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 64 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:416) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 65 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:418) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 66 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:420) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 67 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:422) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 68 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:424) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 69 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:426) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 70 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:428) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 71 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:430) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 72 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:432) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 73 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:434) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 74 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:436) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 75 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:438) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 76 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:440) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 77 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:442) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 78 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:444) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 79 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:446) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 80 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:448) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 81 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:450) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 82 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:452) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 83 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:454) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 4 .. 92, skip 84 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:456) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 5 .. 92, skip 85 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:458) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 6 .. 92, skip 86 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:460) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 7 .. 92, skip 87 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:462) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 0 .. 92, skip 88 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 8 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 8 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:464) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 1 .. 92, skip 89 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:466) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 2 .. 92, skip 90 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 2 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:468) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... +---------- double gran, 3 .. 92, skip 91 ---------- + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:266) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc19_shadowmem.c:265) + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +Possible data race during write of size 1 at 0x........ by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 1 by thread #x + at 0x........: child64 (tc19_shadowmem.c:105) + by 0x........: steer (tc19_shadowmem.c:470) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + +ERROR SUMMARY: 1004 errors from 1004 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc19_shadowmem.stdout.exp b/helgrind/tests/tc19_shadowmem.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc19_shadowmem.stdout.exp diff --git a/helgrind/tests/tc19_shadowmem.vgtest b/helgrind/tests/tc19_shadowmem.vgtest new file mode 100644 index 0000000..233e8e4 --- /dev/null +++ b/helgrind/tests/tc19_shadowmem.vgtest @@ -0,0 +1,2 @@ +prog: tc19_shadowmem +vgopts: --cmp-race-err-addrs=yes --error-limit=no diff --git a/helgrind/tests/tc20_verifywrap.c b/helgrind/tests/tc20_verifywrap.c new file mode 100644 index 0000000..667aafa --- /dev/null +++ b/helgrind/tests/tc20_verifywrap.c @@ -0,0 +1,270 @@ +/* This program attempts to verify that all functions that are + supposed to be wrapped by tc_intercepts.c really are wrapped. The + main way it does this is to cause failures in those functions, so + as to obtain various error messages which imply that the wrapper + really did engage. + + Any regressions shown up by this program are potentially serious + and should be investigated carefully. */ + +/* Needed for older glibcs (2.3 and older, at least) who don't + otherwise "know" about some more exotic pthread stuff, in this case + PTHREAD_MUTEX_ERRORCHECK. */ +#define _GNU_SOURCE 1 +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <unistd.h> +#include <pthread.h> +#include <semaphore.h> + +#if !defined(_AIX) + +#if !defined(__GLIBC_PREREQ) +# error "This program needs __GLIBC_PREREQ (in /usr/include/features.h)" +#endif + +short unprotected = 0; + +void* lazy_child ( void* v ) { + assert(0); /* does not run */ +} + +void* racy_child ( void* v ) { + unprotected = 1234; + return NULL; +} + +int main ( void ) +{ + int r; + /* pthread_t thr; */ + /* pthread_attr_t thra; */ + pthread_mutexattr_t mxa, mxa2; + pthread_mutex_t mx, mx2, mx3, mx4; + pthread_cond_t cv; + struct timespec abstime; + pthread_rwlock_t rwl; + pthread_rwlock_t rwl2; + pthread_rwlock_t rwl3; + sem_t s1; + +# if __GLIBC_PREREQ(2,4) + fprintf(stderr, + "\n\n------ This is output for >= glibc 2.4 ------\n"); +# else + fprintf(stderr, + "\n\n------ This is output for < glibc 2.4 ------\n"); +# endif + + /* --------- pthread_create/join --------- */ + + fprintf(stderr, + "\n---------------- pthread_create/join ----------------\n\n"); + + /* make pthread_create fail */ + /* It's amazingly difficult to make pthread_create fail + without first soaking up all the machine's resources. + Instead, in order to demonstrate that it's really wrapped, + create a child thread, generate a race error, and join with it + again. */ + /* This just segfaults: + memset( &thra, 0xFF, sizeof(thra) ); + r= pthread_create( &thr, NULL, lazy_child, NULL ); assert(r); + */ + { pthread_t child; + r= pthread_create( &child, NULL, racy_child, NULL ); assert(!r); + sleep(1); /* just to ensure parent thread reports race, not child */ + unprotected = 5678; + r= pthread_join( child, NULL ); assert(!r); + } + + /* make pthread_join fail */ + r= pthread_join( pthread_self(), NULL ); assert(r); + + /* --------- pthread_mutex_lock et al --------- */ + + fprintf(stderr, + "\n---------------- pthread_mutex_lock et al ----------------\n\n"); + + /* make pthread_mutex_init fail */ + memset( &mxa, 0xFF, sizeof(mxa) ); + r= pthread_mutex_init( &mx, &mxa ); +# if __GLIBC_PREREQ(2,4) + assert(r); /* glibc >= 2.4: the call should fail */ +# else + assert(!r); /* glibc < 2.4: oh well, glibc didn't bounce this */ +# endif + + /* make pthread_mutex_destroy fail */ + r= pthread_mutex_init( &mx2, NULL ); assert(!r); + r= pthread_mutex_lock( &mx2 ); assert(!r); + r= pthread_mutex_destroy( &mx2 ); assert(r); + + /* make pthread_mutex_lock fail (skipped on < glibc 2.4 because it + doesn't fail, hence hangs the test) */ +# if __GLIBC_PREREQ(2,4) + memset( &mx3, 0xFF, sizeof(mx3) ); + r= pthread_mutex_lock( &mx3 ); assert(r); +# else + fprintf(stderr, "\nmake pthread_mutex_lock fail: " + "skipped on glibc < 2.4\n\n"); +# endif + + /* make pthread_mutex_trylock fail */ + memset( &mx3, 0xFF, sizeof(mx3) ); + r= pthread_mutex_trylock( &mx3 ); assert(r); + + /* make pthread_mutex_timedlock fail */ + memset( &abstime, 0, sizeof(abstime) ); + memset( &mx3, 0xFF, sizeof(mx3) ); + r= pthread_mutex_timedlock( &mx3, &abstime ); assert(r); + + /* make pthread_mutex_unlock fail */ + memset( &mx3, 0xFF, sizeof(mx3) ); + r= pthread_mutex_unlock( &mx3 ); +# if __GLIBC_PREREQ(2,4) + assert(r); +# else + assert(!r); +# endif + + /* --------- pthread_cond_wait et al --------- */ + + fprintf(stderr, + "\n---------------- pthread_cond_wait et al ----------------\n\n"); + + /* make pthread_cond_wait fail. This is difficult. Our cunning + plan (tm) is to show up at pthread_cond_wait bearing a + not-locked mutex of the ERRORCHECK flavour and hope (as is + indeed the case with glibc-2.5) that pthread_cond_wait notices + it is not locked, and bounces our request. */ + r= pthread_mutexattr_init( &mxa2 ); assert(!r); + r= pthread_mutexattr_settype( &mxa2, PTHREAD_MUTEX_ERRORCHECK ); + assert(!r); + r= pthread_mutex_init( &mx4, &mxa2 ); assert(!r); + r= pthread_cond_init( &cv, NULL ); assert(!r); + r= pthread_cond_wait( &cv, &mx4 ); assert(r); + r= pthread_mutexattr_destroy( &mxa2 ); assert(!r); + + /* make pthread_cond_signal fail. FIXME: can't figure out how + to */ + r= pthread_cond_signal( &cv ); assert(!r); + fprintf(stderr, "\nFIXME: can't figure out how to " + "verify wrap of pthread_cond_signal\n\n"); + + /* make pthread_cond_broadcast fail. FIXME: can't figure out how + to */ + r= pthread_cond_broadcast( &cv ); assert(!r); + fprintf(stderr, "\nFIXME: can't figure out how to " + "verify wrap of pthread_broadcast_signal\n\n"); + + /* make pthread_cond_timedwait fail. */ + memset( &abstime, 0, sizeof(abstime) ); + abstime.tv_nsec = 1000000000 + 1; + r= pthread_cond_timedwait( &cv, &mx4, &abstime ); assert(r); + + /* --------- pthread_rwlock_* --------- */ + + fprintf(stderr, + "\n---------------- pthread_rwlock_* ----------------\n\n"); + + /* pthread_rwlock_init, pthread_rwlock_unlock */ + /* pthread_rwlock_init: can't make glibc's implementation fail. + However, can demonstrate interceptedness by initialising but not + locking a lock and then unlocking it. Then the unlock call + should say "first seen at .. the init call." So this tests + wrappedness of both calls. */ + r= pthread_rwlock_init( &rwl, NULL ); assert(!r); + r= pthread_rwlock_unlock( &rwl ); + /* assert(r); *//* glibc doesn't complain. It really ought to. Oh well. */ + + /* We can infer the presence of wrapping for pthread_rwlock_rdlock, + pthread_rwlock_wrlock and pthread_rwlock_unlock by making + Thrcheck count the lockedness state, and warning when we unlock + a not-locked lock. Thusly: */ + r= pthread_rwlock_init( &rwl2, NULL ); assert(!r); + + /* w-lock it */ + fprintf(stderr, "(1) no error on next line\n"); + r= pthread_rwlock_wrlock( &rwl2 ); assert(!r); + /* unlock it */ + fprintf(stderr, "(2) no error on next line\n"); + r= pthread_rwlock_unlock( &rwl2 ); assert(!r); + /* unlock it again, get an error */ + fprintf(stderr, "(3) ERROR on next line\n"); + r= pthread_rwlock_unlock( &rwl2 ); assert(!r); + + /* same game with r-locks */ + r= pthread_rwlock_init( &rwl2, NULL ); assert(!r); + /* r-lock it twice */ + fprintf(stderr, "(4) no error on next line\n"); + r= pthread_rwlock_rdlock( &rwl2 ); assert(!r); + fprintf(stderr, "(5) no error on next line\n"); + r= pthread_rwlock_rdlock( &rwl2 ); assert(!r); + /* unlock it twice */ + fprintf(stderr, "(6) no error on next line\n"); + r= pthread_rwlock_unlock( &rwl2 ); assert(!r); + fprintf(stderr, "(7) no error on next line\n"); + r= pthread_rwlock_unlock( &rwl2 ); assert(!r); + /* unlock it again, get an error */ + fprintf(stderr, "(8) ERROR on next line\n"); + r= pthread_rwlock_unlock( &rwl2 ); assert(!r); + + /* Lock rwl3 so the locked-lock-at-dealloc check can complain about + it. */ + r= pthread_rwlock_init( &rwl3, NULL ); assert(!r); + r= pthread_rwlock_rdlock( &rwl3 ); assert(!r); + + /* ------------- sem_* ------------- */ + + /* This is pretty lame, and duplicates tc18_semabuse.c. */ + + fprintf(stderr, + "\n---------------- sem_* ----------------\n\n"); + + /* verifies wrap of sem_init */ + /* Do sem_init with huge initial count - fails */ + r= sem_init(&s1, 0, ~0); assert(r); + + /* initialise properly */ + r= sem_init(&s1, 0, 0); + + /* in glibc, sem_destroy is a no-op; making it fail is + impossible. */ + fprintf(stderr, "\nFIXME: can't figure out how to verify wrap of " + "sem_destroy\n\n"); + + /* verifies wrap of sem_wait */ + /* Do 'wait' on a bogus semaphore. This should fail, but on glibc + it succeeds. */ + memset(&s1, 0x55, sizeof(s1)); + r= sem_wait(&s1); /* assert(r != 0); */ + + /* this only fails with glibc 2.7 or later. */ + r= sem_post(&s1); + fprintf(stderr, "\nFIXME: can't figure out how to verify wrap of " + "sem_post\n\n"); + + sem_destroy(&s1); + + /* ------------- dealloc of mem holding locks ------------- */ + + fprintf(stderr, + "\n------------ dealloc of mem holding locks ------------\n\n"); + + /* At this point it should complain about deallocation + of memory containing locked locks: + rwl3 + */ + + return 0; +} + +#else /* defined(_AIX) */ +int main ( void ) +{ + fprintf(stderr, "This program does not work on AIX.\n"); + return 0; +} +#endif diff --git a/helgrind/tests/tc20_verifywrap.stderr.exp-glibc25-amd64 b/helgrind/tests/tc20_verifywrap.stderr.exp-glibc25-amd64 new file mode 100644 index 0000000..5d001f5 --- /dev/null +++ b/helgrind/tests/tc20_verifywrap.stderr.exp-glibc25-amd64 @@ -0,0 +1,154 @@ + + + +------ This is output for >= glibc 2.4 ------ + +---------------- pthread_create/join ---------------- + +Thread #x is the program's root thread + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:76) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: main (tc20_verifywrap.c:78) + This conflicts with a previous write of size 2 by thread #x + at 0x........: racy_child (tc20_verifywrap.c:34) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "unprotected" + declared at tc20_verifywrap.c:27 + +Thread #x's call to pthread_join failed + with error code 35 (EDEADLK: Resource deadlock would occur) + at 0x........: pthread_join (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:83) + +---------------- pthread_mutex_lock et al ---------------- + + +Thread #x's call to pthread_mutex_init failed + with error code 95 (EOPNOTSUPP: Operation not supported on transport endpoint) + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:92) + +Thread #x: pthread_mutex_destroy of a locked mutex + at 0x........: pthread_mutex_destroy (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:102) + +Thread #x's call to pthread_mutex_destroy failed + with error code 16 (EBUSY: Device or resource busy) + at 0x........: pthread_mutex_destroy (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:102) + +Thread #x's call to pthread_mutex_lock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:108) + +Thread #x's call to pthread_mutex_trylock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_trylock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:116) + +Thread #x's call to pthread_mutex_timedlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_timedlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:121) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:125) + +Thread #x's call to pthread_mutex_unlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:125) + +---------------- pthread_cond_wait et al ---------------- + + +Thread #x: pthread_cond_{timed}wait called with un-held mutex + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:147) + +Thread #x's call to pthread_cond_wait failed + with error code 1 (EPERM: Operation not permitted) + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:147) + +FIXME: can't figure out how to verify wrap of pthread_cond_signal + + +FIXME: can't figure out how to verify wrap of pthread_broadcast_signal + + +Thread #x: pthread_cond_{timed}wait called with un-held mutex + at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:165) + +Thread #x's call to pthread_cond_timedwait failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:165) + +---------------- pthread_rwlock_* ---------------- + + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:179) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:178) +(1) no error on next line +(2) no error on next line +(3) ERROR on next line + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:196) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:186) +(4) no error on next line +(5) no error on next line +(6) no error on next line +(7) no error on next line +(8) ERROR on next line + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:212) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:186) + +---------------- sem_* ---------------- + + +Thread #x's call to sem_init failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: sem_init@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:228) + +FIXME: can't figure out how to verify wrap of sem_destroy + + +Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post + at 0x........: sem_wait_WRK (hg_intercepts.c:...) + by 0x........: sem_wait (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:242) + +FIXME: can't figure out how to verify wrap of sem_post + + +------------ dealloc of mem holding locks ------------ + + +Thread #x: Exiting thread still holds 1 lock + ... + +ERROR SUMMARY: 20 errors from 20 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc20_verifywrap.stderr.exp-glibc27-amd64 b/helgrind/tests/tc20_verifywrap.stderr.exp-glibc27-amd64 new file mode 100644 index 0000000..6e9af75 --- /dev/null +++ b/helgrind/tests/tc20_verifywrap.stderr.exp-glibc27-amd64 @@ -0,0 +1,160 @@ + + + +------ This is output for >= glibc 2.4 ------ + +---------------- pthread_create/join ---------------- + +Thread #x is the program's root thread + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:76) + +Possible data race during write of size 2 at 0x........ by thread #x + at 0x........: main (tc20_verifywrap.c:78) + This conflicts with a previous write of size 2 by thread #x + at 0x........: racy_child (tc20_verifywrap.c:34) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside global var "unprotected" + declared at tc20_verifywrap.c:27 + +Thread #x's call to pthread_join failed + with error code 35 (EDEADLK: Resource deadlock would occur) + at 0x........: pthread_join (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:83) + +---------------- pthread_mutex_lock et al ---------------- + + +Thread #x's call to pthread_mutex_init failed + with error code 95 (EOPNOTSUPP: Operation not supported on transport endpoint) + at 0x........: pthread_mutex_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:92) + +Thread #x: pthread_mutex_destroy of a locked mutex + at 0x........: pthread_mutex_destroy (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:102) + +Thread #x's call to pthread_mutex_destroy failed + with error code 16 (EBUSY: Device or resource busy) + at 0x........: pthread_mutex_destroy (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:102) + +Thread #x's call to pthread_mutex_lock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_lock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:108) + +Thread #x's call to pthread_mutex_trylock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_trylock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:116) + +Thread #x's call to pthread_mutex_timedlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_timedlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:121) + +Thread #x unlocked an invalid lock at 0x........ + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:125) + +Thread #x's call to pthread_mutex_unlock failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_mutex_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:125) + +---------------- pthread_cond_wait et al ---------------- + + +Thread #x: pthread_cond_{timed}wait called with un-held mutex + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:147) + +Thread #x's call to pthread_cond_wait failed + with error code 1 (EPERM: Operation not permitted) + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:147) + +FIXME: can't figure out how to verify wrap of pthread_cond_signal + + +FIXME: can't figure out how to verify wrap of pthread_broadcast_signal + + +Thread #x: pthread_cond_{timed}wait called with un-held mutex + at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:165) + +Thread #x's call to pthread_cond_timedwait failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:165) + +---------------- pthread_rwlock_* ---------------- + + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:179) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:178) +(1) no error on next line +(2) no error on next line +(3) ERROR on next line + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:196) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:186) +(4) no error on next line +(5) no error on next line +(6) no error on next line +(7) no error on next line +(8) ERROR on next line + +Thread #x unlocked a not-locked lock at 0x........ + at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:212) + Lock at 0x........ was first observed + at 0x........: pthread_rwlock_init (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:186) + +---------------- sem_* ---------------- + + +Thread #x's call to sem_init failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: sem_init@* (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:228) + +FIXME: can't figure out how to verify wrap of sem_destroy + + +Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post + at 0x........: sem_wait_WRK (hg_intercepts.c:...) + by 0x........: sem_wait (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:242) + +Thread #x's call to sem_post failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: sem_post_WRK (hg_intercepts.c:...) + by 0x........: sem_post (hg_intercepts.c:...) + by 0x........: main (tc20_verifywrap.c:245) + +FIXME: can't figure out how to verify wrap of sem_post + + +------------ dealloc of mem holding locks ------------ + + +Thread #x: Exiting thread still holds 1 lock + ... + +ERROR SUMMARY: 21 errors from 21 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc20_verifywrap.stdout.exp b/helgrind/tests/tc20_verifywrap.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc20_verifywrap.stdout.exp diff --git a/helgrind/tests/tc20_verifywrap.vgtest b/helgrind/tests/tc20_verifywrap.vgtest new file mode 100644 index 0000000..7683e8a --- /dev/null +++ b/helgrind/tests/tc20_verifywrap.vgtest @@ -0,0 +1,2 @@ +prog: tc20_verifywrap +vgopts: --read-var-info=yes diff --git a/helgrind/tests/tc21_pthonce.c b/helgrind/tests/tc21_pthonce.c new file mode 100644 index 0000000..69fac76 --- /dev/null +++ b/helgrind/tests/tc21_pthonce.c @@ -0,0 +1,96 @@ + +/* This really exists to check that Thrcheck behaves plausibly + with pthread_once calls. Which it appears to. + + The original source of this program is as shown below, although it + has been modified somewhat. See + http://www.oreilly.com/pub/a/oreilly/ask_tim/2001/codepolicy.html + for OReilly's policy on using bits of their code examples. +*/ + + +/******************************************************** + * An example source module to accompany... + * + * "Using POSIX Threads: Programming with Pthreads" + * by Brad Nichols, Dick Buttlar, Jackie Farrell + * O'Reilly & Associates, Inc. + * + ******************************************************** + * once_exam.c + * + * An example of using the pthreads_once() call to execute an + * initialization procedure. + * + * A program spawns multiple threads and each one tries to + * execute the routine welcome() using the once call. Only + * the first thread into the once routine will actually + * execute welcome(). + * + * The program's main thread synchronizes its exit with the + * exit of the threads using the pthread_join() operation. + * +*/ + +#include <stdlib.h> +#include <stdio.h> +#include <unistd.h> +#include <sys/types.h> +#include <assert.h> + +#include <pthread.h> + +/* With more than 2 threads, the precise error reports vary between + platforms, in terms of the number of races detected. Make life + simple and just have 2 threads and so just 1 race. */ +#define NUM_THREADS 2 + +static pthread_once_t welcome_once_block = PTHREAD_ONCE_INIT; + +static int unprotected1 = 0; +static int unprotected2 = 0; + +/* This is a hack: delay threads except the first enough so as to + ensure threads[0] gets to the pthread_once call first. This is so + as to ensure that this test produces results which aren't + scheduling sensitive. (sigh) */ +void maybe_stall ( int myid ) +{ + assert(myid >= 0 && myid < NUM_THREADS); + if (myid > 0) + sleep(1); +} + +void welcome(void) { + printf("welcome: Welcome\n"); + unprotected1++; /* this is harmless */ +} + +void* child ( void* argV ) { + int r; + maybe_stall( *(int*)argV ); + r= pthread_once(&welcome_once_block, welcome); assert(!r); + printf("child: Hi, I'm thread %d\n", *(int*)argV); + unprotected2++; /* whereas this is a race */ + return NULL; +} + +int main ( void ) { + int *id_arg, i, r; + pthread_t threads[NUM_THREADS]; + + id_arg = (int *)malloc(NUM_THREADS*sizeof(int)); + + for (i = 0; i < NUM_THREADS; i++) { + id_arg[i] = i; + r= pthread_create(&threads[i], NULL, child, &id_arg[i]); + assert(!r); + } + + for (i = 0; i < NUM_THREADS; i++) { + pthread_join(threads[i], NULL); + /* printf("main: joined to thread %d\n", i); */ + } + printf("main: Goodbye\n"); + return 0; +} diff --git a/helgrind/tests/tc21_pthonce.stderr.exp b/helgrind/tests/tc21_pthonce.stderr.exp new file mode 100644 index 0000000..65cae9a --- /dev/null +++ b/helgrind/tests/tc21_pthonce.stderr.exp @@ -0,0 +1,34 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc21_pthonce.c:86) + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc21_pthonce.c:86) + +Possible data race during read of size 4 at 0x........ by thread #x + at 0x........: child (tc21_pthonce.c:74) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child (tc21_pthonce.c:74) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside local var "unprotected2" + declared at tc21_pthonce.c:51, in frame #x of thread x + +Possible data race during write of size 4 at 0x........ by thread #x + at 0x........: child (tc21_pthonce.c:74) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + This conflicts with a previous write of size 4 by thread #x + at 0x........: child (tc21_pthonce.c:74) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + ... + Location 0x........ is 0 bytes inside local var "unprotected2" + declared at tc21_pthonce.c:51, in frame #x of thread x + +ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc21_pthonce.stdout.exp b/helgrind/tests/tc21_pthonce.stdout.exp new file mode 100644 index 0000000..e6c2dc2 --- /dev/null +++ b/helgrind/tests/tc21_pthonce.stdout.exp @@ -0,0 +1,4 @@ +welcome: Welcome +child: Hi, I'm thread 0 +child: Hi, I'm thread 1 +main: Goodbye diff --git a/helgrind/tests/tc21_pthonce.vgtest b/helgrind/tests/tc21_pthonce.vgtest new file mode 100644 index 0000000..0887de8 --- /dev/null +++ b/helgrind/tests/tc21_pthonce.vgtest @@ -0,0 +1,2 @@ +prog: tc21_pthonce +vgopts: --read-var-info=yes diff --git a/helgrind/tests/tc22_exit_w_lock.c b/helgrind/tests/tc22_exit_w_lock.c new file mode 100644 index 0000000..d40600e --- /dev/null +++ b/helgrind/tests/tc22_exit_w_lock.c @@ -0,0 +1,50 @@ + +#include <pthread.h> +#include <unistd.h> +#include <assert.h> +#include <signal.h> + +/* Should see 3 threads exiting in different ways, all holding one (or + two) locks. */ + +pthread_mutex_t mxC1 = PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t mxC2 = PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t mxC2b = PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t mxP = PTHREAD_MUTEX_INITIALIZER; + +/* This one exits in the normal way, by joining back */ +void* child_fn1 ( void* arg ) +{ + int r= pthread_mutex_lock( &mxC1 ); assert(!r); + return NULL; +} + +/* This one detaches, does its own thing. */ +void* child_fn2 ( void* arg ) +{ + int r; + r= pthread_mutex_lock( &mxC2 ); assert(!r); + r= pthread_mutex_lock( &mxC2b ); assert(!r); + r= pthread_detach( pthread_self() ); assert(!r); + return NULL; +} + +/* Parent creates 2 children, takes a lock, waits, segfaults. Use + sleeps to enforce exit ordering, for repeatable regtesting. */ +int main ( void ) +{ + int r; + pthread_t child1, child2; + + r= pthread_create(&child2, NULL, child_fn2, NULL); assert(!r); + sleep(1); + + r= pthread_create(&child1, NULL, child_fn1, NULL); assert(!r); + r= pthread_join(child1, NULL); assert(!r); + sleep(1); + + r= pthread_mutex_lock( &mxP ); + + kill( getpid(), SIGABRT ); + return 0; +} diff --git a/helgrind/tests/tc22_exit_w_lock.stderr.exp b/helgrind/tests/tc22_exit_w_lock.stderr.exp new file mode 100644 index 0000000..74139f1 --- /dev/null +++ b/helgrind/tests/tc22_exit_w_lock.stderr.exp @@ -0,0 +1,23 @@ + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc22_exit_w_lock.c:39) + +Thread #x: Exiting thread still holds 2 locks + ... + +Thread #x was created + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (tc22_exit_w_lock.c:42) + +Thread #x: Exiting thread still holds 1 lock + ... + +Thread #x is the program's root thread + +Thread #x: Exiting thread still holds 1 lock + ... + +ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc22_exit_w_lock.stdout.exp b/helgrind/tests/tc22_exit_w_lock.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc22_exit_w_lock.stdout.exp diff --git a/helgrind/tests/tc22_exit_w_lock.vgtest b/helgrind/tests/tc22_exit_w_lock.vgtest new file mode 100644 index 0000000..4f85dd5 --- /dev/null +++ b/helgrind/tests/tc22_exit_w_lock.vgtest @@ -0,0 +1 @@ +prog: tc22_exit_w_lock diff --git a/helgrind/tests/tc23_bogus_condwait.c b/helgrind/tests/tc23_bogus_condwait.c new file mode 100644 index 0000000..a0fad5d --- /dev/null +++ b/helgrind/tests/tc23_bogus_condwait.c @@ -0,0 +1,86 @@ + +/* Expect 5 errors total (4 re cvs, 1 re exiting w/lock.). + Tests passing bogus mutexes to pthread_cond_wait. */ +#define _GNU_SOURCE 1 /* needed by glibc <= 2.3 for pthread_rwlock_* */ +#include <pthread.h> +#include <assert.h> +#include <unistd.h> +#include <semaphore.h> + +pthread_mutex_t mx[4]; +pthread_cond_t cv; +pthread_rwlock_t rwl; + +sem_t quit_now; + +void* rescue_me ( void* uu ) +{ + /* wait for, and unblock, the first wait */ + sleep(1); + pthread_cond_signal( &cv ); + + /* wait for, and unblock, the second wait */ + sleep(1); + pthread_cond_signal( &cv ); + + /* wait for, and unblock, the third wait */ + sleep(1); + pthread_cond_signal( &cv ); + + /* wait for, and unblock, the fourth wait */ + sleep(1); + pthread_cond_signal( &cv ); + + sem_wait( &quit_now ); + return NULL; +} + +void* grab_the_lock ( void* uu ) +{ + int r= pthread_mutex_lock( &mx[2] ); assert(!r); + sem_wait( &quit_now ); + r= pthread_mutex_unlock( &mx[2] ); assert(!r); + return NULL; +} + +int main ( void ) +{ + int r; + pthread_t my_rescuer, grabber; + + r= pthread_mutex_init(&mx[0], NULL); assert(!r); + r= pthread_mutex_init(&mx[1], NULL); assert(!r); + r= pthread_mutex_init(&mx[2], NULL); assert(!r); + r= pthread_mutex_init(&mx[3], NULL); assert(!r); + + r= pthread_cond_init(&cv, NULL); assert(!r); + r= pthread_rwlock_init(&rwl, NULL); assert(!r); + + r= sem_init( &quit_now, 0,0 ); assert(!r); + + r= pthread_create( &grabber, NULL, grab_the_lock, NULL ); assert(!r); + sleep(1); /* let the grabber get there first */ + + r= pthread_create( &my_rescuer, NULL, rescue_me, NULL ); assert(!r); + /* Do stupid things and hope that rescue_me gets us out of + trouble */ + + /* mx is bogus */ + r= pthread_cond_wait(&cv, (pthread_mutex_t*)(1 + (char*)&mx[0]) ); + + /* mx is not locked */ + r= pthread_cond_wait(&cv, &mx[0]); + + /* wrong flavour of lock */ + r= pthread_cond_wait(&cv, (pthread_mutex_t*)&rwl ); + + /* mx is held by someone else. */ + r= pthread_cond_wait(&cv, &mx[2] ); + + r= sem_post( &quit_now ); assert(!r); + r= sem_post( &quit_now ); assert(!r); + + r= pthread_join( my_rescuer, NULL ); assert(!r); + r= pthread_join( grabber, NULL ); assert(!r); + return 0; +} diff --git a/helgrind/tests/tc23_bogus_condwait.stderr.exp b/helgrind/tests/tc23_bogus_condwait.stderr.exp new file mode 100644 index 0000000..d80ee1a --- /dev/null +++ b/helgrind/tests/tc23_bogus_condwait.stderr.exp @@ -0,0 +1,20 @@ + +Thread #x is the program's root thread + +Thread #x: pthread_cond_{timed}wait called with invalid mutex + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc23_bogus_condwait.c:69) + +Thread #x: pthread_cond_{timed}wait called with un-held mutex + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc23_bogus_condwait.c:72) + +Thread #x: pthread_cond_{timed}wait called with mutex of type pthread_rwlock_t* + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc23_bogus_condwait.c:75) + +Thread #x: pthread_cond_{timed}wait called with mutex held by a different thread + at 0x........: pthread_cond_wait@* (hg_intercepts.c:...) + by 0x........: main (tc23_bogus_condwait.c:78) + +ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc23_bogus_condwait.stdout.exp b/helgrind/tests/tc23_bogus_condwait.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc23_bogus_condwait.stdout.exp diff --git a/helgrind/tests/tc23_bogus_condwait.vgtest b/helgrind/tests/tc23_bogus_condwait.vgtest new file mode 100644 index 0000000..31c3ed8 --- /dev/null +++ b/helgrind/tests/tc23_bogus_condwait.vgtest @@ -0,0 +1 @@ +prog: tc23_bogus_condwait diff --git a/helgrind/tests/tc24_nonzero_sem.c b/helgrind/tests/tc24_nonzero_sem.c new file mode 100644 index 0000000..01c23e8 --- /dev/null +++ b/helgrind/tests/tc24_nonzero_sem.c @@ -0,0 +1,41 @@ + +/* Check that Helgrind does not complain about semaphores with a + nonzero initial value, when said semaphores are correctly used. + Also useful for generating VCG of simple semaphore activity, for + inspection. */ + +#include <pthread.h> +#include <semaphore.h> +#include <assert.h> + +#define N_THREADS 3 + +void* child_fn ( void* semV ) +{ + int r; + sem_t* sem = (sem_t*)semV; + r= sem_wait(sem); assert(!r); + return NULL; +} + +int main ( void ) +{ + int r, i; + sem_t sem; + pthread_t child[N_THREADS]; + + r= sem_init(&sem, 0, N_THREADS); assert(!r); + + for (i = 0; i < N_THREADS; i++) { + r= pthread_create( &child[i], NULL, child_fn, (void*)&sem ); + assert(!r); + } + + for (i = 0; i < N_THREADS; i++) { + r= pthread_join( child[i], NULL ); + assert(!r); + } + + sem_destroy(&sem); + return 0; +} diff --git a/helgrind/tests/tc24_nonzero_sem.stderr.exp b/helgrind/tests/tc24_nonzero_sem.stderr.exp new file mode 100644 index 0000000..d18786f --- /dev/null +++ b/helgrind/tests/tc24_nonzero_sem.stderr.exp @@ -0,0 +1,3 @@ + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc24_nonzero_sem.stdout.exp b/helgrind/tests/tc24_nonzero_sem.stdout.exp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/helgrind/tests/tc24_nonzero_sem.stdout.exp diff --git a/helgrind/tests/tc24_nonzero_sem.vgtest b/helgrind/tests/tc24_nonzero_sem.vgtest new file mode 100644 index 0000000..1a43121 --- /dev/null +++ b/helgrind/tests/tc24_nonzero_sem.vgtest @@ -0,0 +1,2 @@ +prog: tc24_nonzero_sem +vgopts: --hg-sanity-flags=111111 diff --git a/helgrind/vgpreload_helgrind-x86-linux.so b/helgrind/vgpreload_helgrind-x86-linux.so Binary files differnew file mode 100755 index 0000000..67c04d1 --- /dev/null +++ b/helgrind/vgpreload_helgrind-x86-linux.so |