]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
add additional stderr.exp file for helgrind/tests/pth_destroy_cond
authorPetar Jovanovic <mips32r2@gmail.com>
Thu, 13 Apr 2017 16:33:06 +0000 (16:33 +0000)
committerPetar Jovanovic <mips32r2@gmail.com>
Thu, 13 Apr 2017 16:33:06 +0000 (16:33 +0000)
On some platforms, Helgrind detects valid additional data race over "cond".
Thread one is at pthread_cond_wait(&cond, &mutex).
Thread two is at pthread_cond_destroy(&cond).

This fixes helgrind/tests/pth_destroy_cond on different platforms.

Contributed by Aleksandra Karadzic.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16304

helgrind/tests/Makefile.am
helgrind/tests/pth_destroy_cond.stderr.exp2 [new file with mode: 0644]

index df82169fb37994b5f7307514c091e928fb3adb3e..48f5233a0c467289c6b8fc3df51bd6c8efeedd73 100644 (file)
@@ -46,7 +46,8 @@ EXTRA_DIST = \
        pth_barrier2.vgtest pth_barrier2.stdout.exp pth_barrier2.stderr.exp \
        pth_barrier3.vgtest pth_barrier3.stdout.exp pth_barrier3.stderr.exp \
        pth_destroy_cond.vgtest \
-               pth_destroy_cond.stdout.exp pth_destroy_cond.stderr.exp \
+               pth_destroy_cond.stdout.exp \
+               pth_destroy_cond.stderr.exp pth_destroy_cond.stderr.exp2 \
        pth_cond_destroy_busy.vgtest pth_cond_destroy_busy.stderr.exp \
                pth_cond_destroy_busy.stderr.exp-ppc64 \
                pth_cond_destroy_busy.stderr.exp-solaris \
diff --git a/helgrind/tests/pth_destroy_cond.stderr.exp2 b/helgrind/tests/pth_destroy_cond.stderr.exp2
new file mode 100644 (file)
index 0000000..593b4ef
--- /dev/null
@@ -0,0 +1,44 @@
+---Thread-Announcement------------------------------------------
+
+Thread #x was created
+   ...
+   by 0x........: pthread_create@* (hg_intercepts.c:...)
+   by 0x........: main (pth_destroy_cond.c:29)
+
+---Thread-Announcement------------------------------------------
+
+Thread #x is the program's root thread
+
+----------------------------------------------------------------
+
+ Lock at 0x........ was first observed
+   at 0x........: pthread_mutex_init (hg_intercepts.c:...)
+   by 0x........: main (pth_destroy_cond.c:25)
+ Address 0x........ is 0 bytes inside data symbol "mutex"
+
+Possible data race during read of size 1 at 0x........ by thread #x
+Locks held: 1, at address 0x........
+   at 0x........: my_memcmp (hg_intercepts.c:...)
+   by 0x........: pthread_cond_destroy_WRK (hg_intercepts.c:...)
+   by 0x........: pthread_cond_destroy@* (hg_intercepts.c:...)
+   by 0x........: ThreadFunction (pth_destroy_cond.c:18)
+   by 0x........: mythread_wrapper (hg_intercepts.c:...)
+   ...
+
+This conflicts with a previous write of size 4 by thread #x
+Locks held: none
+   ...
+   by 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+   by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+   by 0x........: main (pth_destroy_cond.c:31)
+ Address 0x........ is 4 bytes inside data symbol "cond"
+
+----------------------------------------------------------------
+
+Thread #x: pthread_cond_destroy: destruction of condition variable being waited upon
+   at 0x........: pthread_cond_destroy_WRK (hg_intercepts.c:...)
+   by 0x........: pthread_cond_destroy@* (hg_intercepts.c:...)
+   by 0x........: ThreadFunction (pth_destroy_cond.c:18)
+   by 0x........: mythread_wrapper (hg_intercepts.c:...)
+   ...
+