From: Bart Van Assche Date: Sun, 14 Apr 2019 03:24:33 +0000 (-0700) Subject: drd/tests/tsan_unittest: Avoid that this test reads from uninitialized memory X-Git-Tag: VALGRIND_3_16_0~303 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ebdd45026af7ba29814192798ee73a7c64b00da;p=thirdparty%2Fvalgrind.git drd/tests/tsan_unittest: Avoid that this test reads from uninitialized memory Reported-by: Philippe Waroquiers --- diff --git a/drd/tests/tsan_thread_wrappers_pthread.h b/drd/tests/tsan_thread_wrappers_pthread.h index 878d440e75..45485ea85d 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));}