|
From: Bart V. A. <bva...@so...> - 2019-04-18 00:43:30
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=7ebdd45026af7ba29814192798ee73a7c64b00da commit 7ebdd45026af7ba29814192798ee73a7c64b00da Author: Bart Van Assche <bva...@ac...> Date: Sat Apr 13 20:24:33 2019 -0700 drd/tests/tsan_unittest: Avoid that this test reads from uninitialized memory Reported-by: Philippe Waroquiers <phi...@sk...> Diff: --- drd/tests/tsan_thread_wrappers_pthread.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drd/tests/tsan_thread_wrappers_pthread.h b/drd/tests/tsan_thread_wrappers_pthread.h index 878d440..45485ea 100644 --- a/drd/tests/tsan_thread_wrappers_pthread.h +++ b/drd/tests/tsan_thread_wrappers_pthread.h @@ -351,11 +351,11 @@ class WriterLockScoped { // Scoped RWLock Locker/Unlocker class MyThread { public: MyThread(void* (*worker)(void *), void *arg = NULL, const char *name = NULL) - :wpvpv_(worker), arg_(arg), name_(name) {} + :wpvpv_(worker), wvv_(), wvpv_(), arg_(arg), name_(name) {} MyThread(void (*worker)(void), void *arg = NULL, const char *name = NULL) - :wvv_(worker), arg_(arg), name_(name) {} + :wpvpv_(), wvv_(worker), wvpv_(), arg_(arg), name_(name) {} MyThread(void (*worker)(void *), void *arg = NULL, const char *name = NULL) - :wvpv_(worker), arg_(arg), name_(name) {} + :wpvpv_(), wvv_(), wvpv_(worker), arg_(arg), name_(name) {} void Start() { CHECK(0 == pthread_create(&t_, NULL, ThreadBody, this));} void Join() { CHECK(0 == pthread_join(t_, NULL));} |