From ab5479e94e2a676b5570fa98c73145b0bff5bac5 Mon Sep 17 00:00:00 2001 From: Petar Jovanovic Date: Thu, 13 Apr 2017 16:33:06 +0000 Subject: [PATCH] add additional stderr.exp file for helgrind/tests/pth_destroy_cond 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 | 3 +- helgrind/tests/pth_destroy_cond.stderr.exp2 | 44 +++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 helgrind/tests/pth_destroy_cond.stderr.exp2 diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index df82169fb3..48f5233a0c 100644 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -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 index 0000000000..593b4ef35b --- /dev/null +++ b/helgrind/tests/pth_destroy_cond.stderr.exp2 @@ -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:...) + ... + -- 2.47.2